Skip to content

Command ​

Loading...

<flint-command-shortcut> ​

Displays a keyboard shortcut hint inside a command item. Slot the shortcut string (e.g. ⌘P) as default slot content.

  • Tag: <flint-command-shortcut>
  • Class: FlintCommandShortcut

Import ​

ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintCommandShortcut } from '@getufy/flint-ui';

Usage ​

html
<flint-command-shortcut></flint-command-shortcut>

Slots ​

NameDescription
(default)Shortcut text, e.g. ⌘P or Ctrl+K.

CSS Custom Properties ​

PropertyDefault
--flint-border-radius-md—
--flint-shadow-xl—
--flint-text-color-muted—
--flint-font-family—
--flint-border-color—
--flint-text-color—
--flint-hover-color—
--flint-primary-color—

<flint-command-separator> ​

A hairline separator between command groups.

  • Tag: <flint-command-separator>
  • Class: FlintCommandSeparator

Import ​

ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintCommandSeparator } from '@getufy/flint-ui';

Usage ​

html
<flint-command-separator></flint-command-separator>

<flint-command-item> ​

A single interactive option inside a command menu.

  • Tag: <flint-command-item>
  • Class: FlintCommandItem

Import ​

ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintCommandItem } from '@getufy/flint-ui';

Usage ​

html
<flint-command-item></flint-command-item>

Properties ​

PropertyAttributeTypeDefaultDescription
valuevaluestring''Machine-readable value used for filter matching. Falls back to textContent.
disableddisabledbooleanfalseDisables the item — non-interactive and skipped in keyboard nav.
highlightedhighlightedbooleanfalseSet by parent flint-command to indicate keyboard focus.

Events ​

EventDetailDescription
flint-command-item-select&#123; value: string &#125;Fired when the item is activated. detail: &#123; value: string &#125;

Slots ​

NameDescription
(default)Item label text.
iconLeading icon (16×16).
shortcutTrailing shortcut hint; prefer &lt;flint-command-shortcut&gt;.

Methods ​

MethodDescription
scrollIntoViewIfNeeded(): voidScroll this item into view (nearest ancestor scroll container).

<flint-command-empty> ​

Empty state message shown when no command items match the current query. Managed automatically by the parent flint-command element.

  • Tag: <flint-command-empty>
  • Class: FlintCommandEmpty

Import ​

ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintCommandEmpty } from '@getufy/flint-ui';

Usage ​

html
<flint-command-empty></flint-command-empty>

Slots ​

NameDescription
(default)Message text, e.g. "No results found."

<flint-command-group> ​

A labeled group of command items. The parent flint-command automatically hides the whole group when all its items are filtered out.

  • Tag: <flint-command-group>
  • Class: FlintCommandGroup

Import ​

ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintCommandGroup } from '@getufy/flint-ui';

Usage ​

html
<flint-command-group></flint-command-group>

Properties ​

PropertyAttributeTypeDefaultDescription
headingheadingstring''Label rendered above the group items.

Slots ​

NameDescription
(default)flint-command-item elements.

<flint-command-list> ​

Scrollable list container for command items and groups.

  • Tag: <flint-command-list>
  • Class: FlintCommandList

Import ​

ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintCommandList } from '@getufy/flint-ui';

Usage ​

html
<flint-command-list></flint-command-list>

Slots ​

NameDescription
(default)flint-command-group, flint-command-item, flint-command-empty, flint-command-separator.

CSS Custom Properties ​

PropertyDefault
--flint-command-list-max-height300px

<flint-command-input> ​

Search input for the command menu. Dispatches flint-command-filter events that the parent flint-command intercepts to apply filtering.

  • Tag: <flint-command-input>
  • Class: FlintCommandInput

Import ​

ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintCommandInput } from '@getufy/flint-ui';

Usage ​

html
<flint-command-input></flint-command-input>

Properties ​

PropertyAttributeTypeDefaultDescription
placeholderplaceholderstring''Placeholder text shown when input is empty.
valuevaluestring''Current input value.

Methods ​

MethodDescription
reset(): voidReset the input value and broadcast an empty filter.

<flint-command> ​

Root command menu component. Manages search filtering and keyboard navigation.

  • Tag: <flint-command>
  • Class: FlintCommand

Import ​

ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintCommand } from '@getufy/flint-ui';

Usage ​

html
<flint-command></flint-command>

Events ​

EventDetailDescription
flint-command-item-select&#123; value: string &#125;Bubbles up from activated items. detail: &#123; value: string &#125;

Slots ​

NameDescription
(default)Command menu content.

CSS Parts ​

NameDescription
commandThe root wrapper div.

CSS Custom Properties ​

PropertyDefault
--flint-command-backdrop-bgrgba(0, 0, 0, 0.5
--flint-command-z-index1400
--flint-command-dialog-width512px
--flint-command-bgvar(--flint-surface-1
--flint-command-panel-border-colorvar(--flint-border-color
--flint-command-highlight-bgvar(--flint-hover-color
--flint-command-highlight-colorvar(--flint-text-color
--flint-command-list-max-height300px
--flint-command-border-colorvar(--flint-border-color

Methods ​

MethodDescription
reset(): voidReset search query and restore all items.

<flint-command-dialog> ​

Modal dialog wrapper for a command menu. Opens with a smooth backdrop + scale animation. Pressing Escape or clicking the backdrop fires flint-command-dialog-close.

  • Tag: <flint-command-dialog>
  • Class: FlintCommandDialog

Import ​

ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintCommandDialog } from '@getufy/flint-ui';

Usage ​

html
<flint-command-dialog></flint-command-dialog>

Properties ​

PropertyAttributeTypeDefaultDescription
openopenbooleanfalseControls the open/closed state of the dialog.

Events ​

EventDetailDescription
flint-command-dialog-close&#123; open: false &#125;Fired when the dialog should close. detail: &#123; open: false &#125; The host is responsible for setting open = false in response.

Slots ​

NameDescription
(default)Place a flint-command element here.

CSS Custom Properties ​

PropertyDefault
--flint-command-dialog-width512px