Editable descriptions allow users to edit the description of some resource in the same place as it's displayed.
The editable description has a skeleton state.
Force the onChange handler to be called upon submission even if the value hasn't changed. This is useful if you programatically change the value which may lead the component to think nothing has changed.
A custom action button can be added. This is useful for actions that generate a description, such as an AI model.
Inherits margin props.
| Name | Default | Description |
|---|---|---|
isDisabled | false | booleanDetermines if description is editable. |
enablePristineSubmit | — | booleanCall the onChange handler upon submission even if the value hasn't changed. |
value | — | stringDescription text. |
placeholder | "Add a description…" | stringPlaceholder text. |
width | "lg" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "auto" | "100%"Width of the component. |
leftAction | — | {
"aria-label": string;
icon: ComponentType<SVGAttributes<SVGElement>>;
isDisabled?: boolean;
isLoading?: boolean;
// Tooltip to show when hovering over the used action indicator.
usedActionTooltip?: ReactNode;
// Tooltip to show when hovering over the action button.
buttonTooltip?: ReactNode;
onClick: () => Promise<void> | void;
}Show a custom button before the confirm and cancel buttons. The object passed to this prop should be stable between renders to avoid unnecessary re-renders. |
onCancel | — | (value: string) => voidCallback invoked when user cancels input with the `Esc` key. It provides the last confirmed value as argument. |
onChange | — | (value: string) => voidCallback invoked when user confirms value. |