blessed-components - v1.20.0
    Preparing search index...

    Interface PromptDialogData

    Stateful data accepted by the Blessed promptDialog adapter.

    interface PromptDialogData {
        backgroundTone?: keyof ThemeColors;
        cancelLabel?: string;
        closeOnAction?: boolean;
        defaultValue?: string;
        description?: string;
        error?: string;
        hint?: string;
        id: string;
        initialFocusId?: "input" | "cancel" | "submit";
        inputDisabled?: boolean;
        message: string;
        modal?: boolean;
        onCancel?: () => void;
        onValueChange?: (value: string) => void;
        onSubmit?: (value: string) => void;
        placeholder?: string;
        required?: boolean;
        submitDisabled?: boolean;
        submitLabel?: string;
        theme?: Theme;
        title: string;
        value?: string;
        defaultOpen?: boolean;
        onOpenChange?: (open: boolean) => void;
        open?: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    backgroundTone?: keyof ThemeColors

    Semantic background token.

    cancelLabel?: string

    Cancel action label.

    'Cancel'

    closeOnAction?: boolean

    Whether submit or cancel requests closing.

    true

    defaultValue?: string

    Initial input value for uncontrolled usage.

    description?: string

    Supporting text shown below the title.

    error?: string

    Validation error shown below the input.

    hint?: string

    Helpful text shown below the input when no error is present.

    id: string

    Stable overlay identifier.

    initialFocusId?: "input" | "cancel" | "submit"

    Preferred registered focus target when opening.

    'input'

    inputDisabled?: boolean

    Whether text editing is unavailable.

    message: string

    Persistent label for the text input.

    modal?: boolean

    Whether this PromptDialog blocks lower overlay layers.

    true

    onCancel?: () => void

    Called when cancellation is requested.

    onValueChange?: (value: string) => void

    Called after user or imperative edits request a value change.

    onSubmit?: (value: string) => void

    Called when submission is requested with the current value.

    placeholder?: string

    Placeholder shown while the input is empty.

    required?: boolean

    Whether the input label includes a required indicator.

    submitDisabled?: boolean

    Whether submission is unavailable.

    submitLabel?: string

    Submit action label.

    'OK'

    theme?: Theme

    Semantic terminal theme.

    title: string

    Dialog title.

    value?: string

    Controlled input value.

    defaultOpen?: boolean

    Initial state for uncontrolled usage.

    false

    onOpenChange?: (open: boolean) => void

    Called when Dialog requests an open-state change.

    open?: boolean

    Controlled open state.