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

    Interface SearchBarData

    Stateful data accepted by the Blessed searchBar adapter.

    interface SearchBarData {
        backgroundTone?: keyof ThemeColors;
        borderTone?: keyof ThemeColors;
        foregroundTone?: keyof ThemeColors;
        theme?: Theme;
        capabilities?: Pick<TerminalCapabilities, "unicode" | "colorLevel">;
        characters?: SearchBarCharacters;
        onActiveTargetChange?: (target: SearchBarTarget) => void;
        placeholder?: string;
        resultCount?: number;
        showSubmit?: boolean;
        width?: number;
        defaultQuery?: string;
        defaultScopeId?: string;
        disabled?: boolean;
        onClear?: () => void;
        onQueryChange?: (query: string) => void;
        onScopeChange?: (scopeId: string) => void;
        onSubmit?: (submission: SearchBarSubmission) => void;
        query?: string;
        scopeId?: string;
        scopes?: readonly SearchBarScope[];
    }

    Hierarchy (View Summary)

    Index

    Properties

    backgroundTone?: keyof ThemeColors

    Semantic background token.

    'background'

    borderTone?: keyof ThemeColors

    Semantic border token.

    'border'

    foregroundTone?: keyof ThemeColors

    Semantic foreground token.

    'foreground'

    theme?: Theme

    Semantic terminal theme.

    capabilities?: Pick<TerminalCapabilities, "unicode" | "colorLevel">

    Terminal capabilities used for characters and theme colors.

    characters?: SearchBarCharacters

    Character tokens used by the pure renderer.

    onActiveTargetChange?: (target: SearchBarTarget) => void

    Called when keyboard focus moves between virtual controls.

    placeholder?: string

    Placeholder shown for an empty query.

    resultCount?: number

    Optional result metadata.

    showSubmit?: boolean

    Whether a submit control is shown.

    true

    width?: number

    Explicit render width, overriding the element's inner width.

    defaultQuery?: string

    Initial query for uncontrolled usage.

    defaultScopeId?: string

    Initial scope id for uncontrolled usage. Defaults to the first scope.

    disabled?: boolean

    Whether state-changing and submission requests are rejected.

    onClear?: () => void

    Called after an enabled clear request.

    onQueryChange?: (query: string) => void

    Called when an enabled query change is requested.

    onScopeChange?: (scopeId: string) => void

    Called when an enabled scope change is requested.

    onSubmit?: (submission: SearchBarSubmission) => void

    Called when an enabled submission is requested.

    query?: string

    Controlled query.

    scopeId?: string

    Controlled scope id.

    scopes?: readonly SearchBarScope[]

    Ordered search scopes.