Component docs
Loading
"use client";
import { InlineEdit } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | Current value (controlled); null where it means "nothing selected". |
cancelLabel | string | — | — |
defaultOpen | boolean | — | Initial open state when uncontrolled. |
defaultValue | string | — | Initial value when uncontrolled. |
editLabel | string | — | — |
inputLabel | string | — | — |
onCancel | () => void | — | — |
onOpenChange | (open: boolean) => void | — | Called with the next open state. |
onSubmit | (value: string) => void | — | Called with the edited text when it is saved (Enter or Save). |
onValueChange | (value: string) => void | — | Called with the new value (only when it changes). |
open | boolean | — | Open state (controlled). |
saveLabel | string | — | — |
valuestring
Current value (controlled); null where it means "nothing selected".
cancelLabelstring
defaultOpenboolean
Initial open state when uncontrolled.
defaultValuestring
Initial value when uncontrolled.
editLabelstring
inputLabelstring
onCancel() => void
onOpenChange(open: boolean) => void
Called with the next open state.
onSubmit(value: string) => void
Called with the edited text when it is saved (Enter or Save).
onValueChange(value: string) => void
Called with the new value (only when it changes).
openboolean
Open state (controlled).
saveLabelstring
Other props are passed to the root element (HTMLAttributes<HTMLDivElement>), including className, style, id and aria-* attributes.
<InlineEdit value="Untitled" />