# InlineEditProps (@salmonui/editors/inline-edit)

> The InlineEditProps interface of @salmonui/editors/inline-edit.

Canonical: https://salmonui.dev/docs/reference/editors/inline-edit/InlineEditProps

```ts
import type { InlineEditProps } from '@salmonui/editors/inline-edit';
```

Entry index: https://salmonui.dev/docs/reference/editors/inline-edit (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/editors/inline-edit.md).

## Reference

Kind: interface

```ts
interface InlineEditProps<T = string> extends RootProps {
    readonly value?: T | undefined;
    readonly defaultValue?: T | undefined;
    readonly save?: ((value: T, options: {
        readonly signal: AbortSignal;
    }) => void | PromiseLike<void>) | undefined;
    readonly mode?: 'inline' | 'popover' | undefined;
    readonly trigger?: 'click' | 'doubleClick' | 'editButton' | undefined;
    readonly blurAction?: 'save' | 'cancel' | 'keep' | undefined;
    readonly saveOnEnter?: boolean | undefined;
    readonly showActions?: boolean | undefined;
    readonly renderActions?: ((context: InlineEditActionsContext) => ReactNode) | undefined;
    readonly validation?: InlineEditValidation<T> | undefined;
    readonly placeholder?: ReactNode;
    readonly renderPreview?: ((context: {
        readonly value: T;
        readonly placeholder: ReactNode;
    }) => ReactNode) | undefined;
    readonly label?: string | undefined;
    readonly editing?: boolean | undefined;
    readonly defaultEditing?: boolean | undefined;
    readonly onEditingChange?: ((editing: boolean, event: InlineEditEditingChangeEvent) => void) | undefined;
    readonly disabled?: boolean | undefined;
    readonly name?: string | undefined;
    readonly popoverProps?: {
        readonly placement?: Placement | undefined;
        readonly offset?: number | undefined;
    } | undefined;
    readonly localeText?: Partial<InlineEditLocaleText> | undefined;
    readonly className?: string | undefined;
    readonly style?: CSSProperties | undefined;
    readonly classNames?: Partial<Record<InlineEditPart, string>> | undefined;
    readonly styles?: Partial<Record<InlineEditPart, CSSProperties>> | undefined;
    readonly ref?: Ref<InlineEditApi> | undefined;
    readonly children?: ((context: InlineEditRenderContext<T>) => ReactNode) | undefined;
    readonly onBeforeEditStart?: ((event: InlineEditStartEvent & InlineEditCancellable) => void) | undefined;
    readonly onEditStart?: ((event: InlineEditStartEvent) => void) | undefined;
    readonly onBeforeSave?: ((event: InlineEditSaveEvent<T> & InlineEditCancellable) => void) | undefined;
    readonly onSave?: ((event: InlineEditSaveEvent<T>) => void) | undefined;
    readonly onSaveError?: ((event: InlineEditSaveErrorEvent<T>) => void) | undefined;
    readonly onBeforeEditCancel?: ((event: InlineEditCancelEvent<T> & InlineEditCancellable) => void) | undefined;
    readonly onEditCancel?: ((event: InlineEditCancelEvent<T>) => void) | undefined;
    readonly onDraftChange?: ((event: InlineEditDraftChangeEvent<T>) => void) | undefined;
}
```

Members (34):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `value` | `readonly value?: T \| undefined;` | optional | Saved value (controlled). |
| `defaultValue` | `readonly defaultValue?: T \| undefined;` | optional | Initial saved value when uncontrolled. Default `''`. |
| `save` | `readonly save?: ((value: T, options: {     readonly signal: AbortSignal; }) => void \| PromiseLike<void>) \| undefined;` | optional | Persists a value. May return a promise: pending state, abort on cancel or unmount, rejection keeps editing. |
| `mode` | `readonly mode?: 'inline' \| 'popover' \| undefined;` | optional | `'popover'` (default) opens the editor in a non-modal dialog anchored to the preview; `'inline'` replaces the preview. |
| `trigger` | `readonly trigger?: 'click' \| 'doubleClick' \| 'editButton' \| undefined;` | optional | What starts editing. Default `'click'`. |
| `blurAction` | `readonly blurAction?: 'save' \| 'cancel' \| 'keep' \| undefined;` | optional | What focus leaving the editor does. Default `'save'`. |
| `saveOnEnter` | `readonly saveOnEnter?: boolean \| undefined;` | optional | Enter saves (Mod+Enter in a textarea). Default true. |
| `showActions` | `readonly showActions?: boolean \| undefined;` | optional | Shows the Save and Cancel buttons. Default true. |
| `renderActions` | `readonly renderActions?: ((context: InlineEditActionsContext) => ReactNode) \| undefined;` | optional | Replaces the default actions. |
| `validation` | `readonly validation?: InlineEditValidation<T> \| undefined;` | optional |  |
| `placeholder` | `readonly placeholder?: ReactNode;` | optional | Shown when the value is empty. Default `localeText.empty`. |
| `renderPreview` | `readonly renderPreview?: ((context: {     readonly value: T;     readonly placeholder: ReactNode; }) => ReactNode) \| undefined;` | optional | Display state content. Default `String(value)`. |
| `label` | `readonly label?: string \| undefined;` | optional | Field label: the accessible name of the preview and the editor. |
| `editing` | `readonly editing?: boolean \| undefined;` | optional | Editing state. |
| `defaultEditing` | `readonly defaultEditing?: boolean \| undefined;` | optional |  |
| `onEditingChange` | `readonly onEditingChange?: ((editing: boolean, event: InlineEditEditingChangeEvent) => void) \| undefined;` | optional |  |
| `disabled` | `readonly disabled?: boolean \| undefined;` | optional |  |
| `name` | `readonly name?: string \| undefined;` | optional | Form field name: a hidden input carries the saved value. |
| `popoverProps` | `readonly popoverProps?: {     readonly placement?: Placement \| undefined;     readonly offset?: number \| undefined; } \| undefined;` | optional | Popover placement and offset. |
| `localeText` | `readonly localeText?: Partial<InlineEditLocaleText> \| undefined;` | optional |  |
| `className` | `readonly className?: string \| undefined;` | optional |  |
| `style` | `readonly style?: CSSProperties \| undefined;` | optional |  |
| `classNames` | `readonly classNames?: Partial<Record<InlineEditPart, string>> \| undefined;` | optional |  |
| `styles` | `readonly styles?: Partial<Record<InlineEditPart, CSSProperties>> \| undefined;` | optional |  |
| `ref` | `readonly ref?: Ref<InlineEditApi> \| undefined;` | optional |  |
| `children` | `readonly children?: ((context: InlineEditRenderContext<T>) => ReactNode) \| undefined;` | optional | The edit element. Default: a text input. |
| `onBeforeEditStart` | `readonly onBeforeEditStart?: ((event: InlineEditStartEvent & InlineEditCancellable) => void) \| undefined;` | optional |  |
| `onEditStart` | `readonly onEditStart?: ((event: InlineEditStartEvent) => void) \| undefined;` | optional |  |
| `onBeforeSave` | `readonly onBeforeSave?: ((event: InlineEditSaveEvent<T> & InlineEditCancellable) => void) \| undefined;` | optional |  |
| `onSave` | `readonly onSave?: ((event: InlineEditSaveEvent<T>) => void) \| undefined;` | optional |  |
| `onSaveError` | `readonly onSaveError?: ((event: InlineEditSaveErrorEvent<T>) => void) \| undefined;` | optional |  |
| `onBeforeEditCancel` | `readonly onBeforeEditCancel?: ((event: InlineEditCancelEvent<T> & InlineEditCancellable) => void) \| undefined;` | optional |  |
| `onEditCancel` | `readonly onEditCancel?: ((event: InlineEditCancelEvent<T>) => void) \| undefined;` | optional |  |
| `onDraftChange` | `readonly onDraftChange?: ((event: InlineEditDraftChangeEvent<T>) => void) \| undefined;` | optional |  |
