Skip to content

command

command

Interfaces

CommandClientConfig

Defined in: packages/ui/build/command/types.d.ts:15

Properties

error?
optional error?: string | null;

Defined in: packages/ui/build/command/types.d.ts:17

isLoading?
optional isLoading?: boolean;

Defined in: packages/ui/build/command/types.d.ts:16


CommandDialogProps

Defined in: packages/ui/build/command/types.d.ts:114

Properties

children?
optional children?: Snippet<[]>;

Defined in: packages/ui/build/command/types.d.ts:118

onOpenChange?
optional onOpenChange?: (open) => void;

Defined in: packages/ui/build/command/types.d.ts:117

Parameters
Parameter Type
open boolean
Returns

void

open?
optional open?: boolean;

Defined in: packages/ui/build/command/types.d.ts:115

value?
optional value?: string;

Defined in: packages/ui/build/command/types.d.ts:116


CommandEmptyProps

Defined in: packages/ui/build/command/types.d.ts:105

Extends

  • WithElementRef<HTMLAttributes<HTMLDivElement>>

Indexable

[key: `data-${string}`]: any
[key: symbol]: false | Attachment<HTMLDivElement> | null | undefined

Properties

children?
optional children?: Snippet<[]>;

Defined in: packages/ui/build/command/types.d.ts:106

Overrides
WithElementRef.children

show?
optional show?: boolean;

Defined in: packages/ui/build/command/types.d.ts:107


CommandGroupHeadingProps

Defined in: packages/ui/build/command/types.d.ts:91

Extends

  • WithElementRef<HTMLAttributes<HTMLDivElement>>

Indexable

[key: `data-${string}`]: any
[key: symbol]: false | Attachment<HTMLDivElement> | null | undefined

Properties

children?
optional children?: Snippet<[]>;

Defined in: packages/ui/build/command/types.d.ts:92

Overrides
WithElementRef.children

CommandGroupItemsProps

Defined in: packages/ui/build/command/types.d.ts:94

Extends

  • WithElementRef<HTMLAttributes<HTMLDivElement>>

Indexable

[key: `data-${string}`]: any
[key: symbol]: false | Attachment<HTMLDivElement> | null | undefined

Properties

children?
optional children?: Snippet<[]>;

Defined in: packages/ui/build/command/types.d.ts:95

Overrides
WithElementRef.children

CommandGroupProps

Defined in: packages/ui/build/command/types.d.ts:87

Extends

  • WithElementRef<HTMLAttributes<HTMLDivElement>>

Indexable

[key: `data-${string}`]: any
[key: symbol]: false | Attachment<HTMLDivElement> | null | undefined

Properties

children?
optional children?: Snippet<[]>;

Defined in: packages/ui/build/command/types.d.ts:89

Overrides
WithElementRef.children

heading?
optional heading?: string;

Defined in: packages/ui/build/command/types.d.ts:88


CommandInfiniteLoadingConfig

Defined in: packages/ui/build/command/types.d.ts:24

Properties

hasMore
hasMore: boolean;

Defined in: packages/ui/build/command/types.d.ts:26

onLoadMore
onLoadMore: (info) => void;

Defined in: packages/ui/build/command/types.d.ts:27

Parameters
Parameter Type
info { lastVisibleIndex: number; loadedCount: number; }
info.lastVisibleIndex number
info.loadedCount number
Returns

void

total
total: number;

Defined in: packages/ui/build/command/types.d.ts:25


CommandInputProps

Defined in: packages/ui/build/command/types.d.ts:97

Extends

  • WithElementRef<Omit<HTMLAttributes<HTMLInputElement>, "prefix">>

Indexable

[key: symbol]: false | Attachment<HTMLInputElement> | null | undefined
[key: `data-${string}`]: any

Properties

disabled?
optional disabled?: boolean;

Defined in: packages/ui/build/command/types.d.ts:100

outerClass?
optional outerClass?: string;

Defined in: packages/ui/build/command/types.d.ts:103

placeholder?
optional placeholder?: string;

Defined in: packages/ui/build/command/types.d.ts:99

Overrides
WithElementRef.placeholder

prefix?
optional prefix?: Snippet<[]>;

Defined in: packages/ui/build/command/types.d.ts:101

suffix?
optional suffix?: Snippet<[]>;

Defined in: packages/ui/build/command/types.d.ts:102

value?
optional value?: string;

Defined in: packages/ui/build/command/types.d.ts:98


CommandItemData

Defined in: packages/ui/build/command/types.d.ts:4

Indexable

[key: string]: unknown

Properties

description?
optional description?: string;

Defined in: packages/ui/build/command/types.d.ts:10

disabled?
optional disabled?: boolean;

Defined in: packages/ui/build/command/types.d.ts:6

groupId?
optional groupId?: string;

Defined in: packages/ui/build/command/types.d.ts:8

href?
optional href?: string;

Defined in: packages/ui/build/command/types.d.ts:11

keywords?
optional keywords?: string[];

Defined in: packages/ui/build/command/types.d.ts:7

label?
optional label?: string;

Defined in: packages/ui/build/command/types.d.ts:9

value
value: string;

Defined in: packages/ui/build/command/types.d.ts:5


CommandListProps

Defined in: packages/ui/build/command/types.d.ts:66

Extends

  • WithElementRef<HTMLAttributes<HTMLDivElement>>

Indexable

[key: `data-${string}`]: any
[key: symbol]: false | Attachment<HTMLDivElement> | null | undefined

Properties

children?
optional children?: Snippet<[]>;

Defined in: packages/ui/build/command/types.d.ts:67

Overrides
WithElementRef.children

clientConfig?
optional clientConfig?: CommandClientConfig;

Defined in: packages/ui/build/command/types.d.ts:83

gap?
optional gap?: number;

Defined in: packages/ui/build/command/types.d.ts:70

infiniteLoading?
optional infiniteLoading?: CommandInfiniteLoadingConfig;

Defined in: packages/ui/build/command/types.d.ts:85

itemHeight?
optional itemHeight?: number;

Defined in: packages/ui/build/command/types.d.ts:68

itemSnippet?
optional itemSnippet?: Snippet<[{
  index: number;
  isIndicator: boolean;
  isSelected: boolean;
  item: CommandItemData;
}]>;

Defined in: packages/ui/build/command/types.d.ts:71

loadMoreThreshold?
optional loadMoreThreshold?: number;

Defined in: packages/ui/build/command/types.d.ts:82

overscan?
optional overscan?: number;

Defined in: packages/ui/build/command/types.d.ts:69

placeholderSnippet?
optional placeholderSnippet?: Snippet<[{
  index: number;
}]>;

Defined in: packages/ui/build/command/types.d.ts:79

serverConfig?
optional serverConfig?: CommandServerConfig;

Defined in: packages/ui/build/command/types.d.ts:84


CommandLoadingProps

Defined in: packages/ui/build/command/types.d.ts:111

Extends

  • WithElementRef<HTMLAttributes<HTMLDivElement>>

Indexable

[key: `data-${string}`]: any
[key: symbol]: false | Attachment<HTMLDivElement> | null | undefined

Properties

children?
optional children?: Snippet<[]>;

Defined in: packages/ui/build/command/types.d.ts:112

Overrides
WithElementRef.children

CommandRootProps

Defined in: packages/ui/build/command/types.d.ts:50

Extends

  • WithElementRef<HTMLAttributes<HTMLDivElement>>

Indexable

[key: `data-${string}`]: any
[key: symbol]: false | Attachment<HTMLDivElement> | null | undefined

Properties

activeValue?
optional activeValue?: string;

Defined in: packages/ui/build/command/types.d.ts:53

children?
optional children?: Snippet<[]>;

Defined in: packages/ui/build/command/types.d.ts:63

Overrides
WithElementRef.children

columns?
optional columns?: number;

Defined in: packages/ui/build/command/types.d.ts:57

disableNavigation?
optional disableNavigation?: boolean;

Defined in: packages/ui/build/command/types.d.ts:64

filter?
optional filter?: FilterFunction;

Defined in: packages/ui/build/command/types.d.ts:56

items?
optional items?: CommandItemData[];

Defined in: packages/ui/build/command/types.d.ts:51

onIndicatorKeydown?
optional onIndicatorKeydown?: (event, context) => boolean | void;

Defined in: packages/ui/build/command/types.d.ts:59

Parameters
Parameter Type
event KeyboardEvent
context { indicatorValue: string | null; items: CommandItemData[]; }
context.indicatorValue string | null
context.items CommandItemData[]
Returns

boolean | void

onValueChange?
optional onValueChange?: (value) => void;

Defined in: packages/ui/build/command/types.d.ts:58

Parameters
Parameter Type
value string
Returns

void

searchValue?
optional searchValue?: string;

Defined in: packages/ui/build/command/types.d.ts:54

shouldFilter?
optional shouldFilter?: boolean;

Defined in: packages/ui/build/command/types.d.ts:55

value?
optional value?: string | string[];

Defined in: packages/ui/build/command/types.d.ts:52


CommandSeparatorProps

Defined in: packages/ui/build/command/types.d.ts:109

Extends

  • WithElementRef<HTMLAttributes<HTMLDivElement>>

Indexable

[key: `data-${string}`]: any
[key: symbol]: false | Attachment<HTMLDivElement> | null | undefined

CommandServerConfig

Defined in: packages/ui/build/command/types.d.ts:19

Properties

error?
optional error?: string | Error | null;

Defined in: packages/ui/build/command/types.d.ts:22

isLoading?
optional isLoading?: boolean;

Defined in: packages/ui/build/command/types.d.ts:21

onSearch
onSearch: (query) => void;

Defined in: packages/ui/build/command/types.d.ts:20

Parameters
Parameter Type
query string
Returns

void


CommandShortcutProps

Defined in: packages/ui/build/command/types.d.ts:120

Extends

  • WithElementRef<HTMLAttributes<HTMLSpanElement>>

Indexable

[key: `data-${string}`]: any
[key: symbol]: false | Attachment<HTMLSpanElement> | null | undefined

Properties

children?
optional children?: Snippet<[]>;

Defined in: packages/ui/build/command/types.d.ts:121

Overrides
WithElementRef.children

CommandStateProps

Defined in: packages/ui/build/command/types.d.ts:40

Properties

activeValue?
readonly optional activeValue?: string;

Defined in: packages/ui/build/command/types.d.ts:44

columns?
optional columns?: number;

Defined in: packages/ui/build/command/types.d.ts:47

filterFn?
optional filterFn?: FilterFunction;

Defined in: packages/ui/build/command/types.d.ts:46

items?
readonly optional items?: CommandItemData[];

Defined in: packages/ui/build/command/types.d.ts:41

onChange?
optional onChange?: (value) => void;

Defined in: packages/ui/build/command/types.d.ts:48

Parameters
Parameter Type
value string
Returns

void

searchValue?
readonly optional searchValue?: string;

Defined in: packages/ui/build/command/types.d.ts:42

shouldFilter
shouldFilter: boolean;

Defined in: packages/ui/build/command/types.d.ts:45

value?
readonly optional value?: string | string[];

Defined in: packages/ui/build/command/types.d.ts:43


TInfiniteLoadingConfig

Defined in: packages/ui/build/command/types.d.ts:32

Properties

handleInfiniteLoad
handleInfiniteLoad: (info) => void;

Defined in: packages/ui/build/command/types.d.ts:35

Parameters
Parameter Type
info { lastVirtualIndex: number; loadedCount: number; }
info.lastVirtualIndex number
info.loadedCount number
Returns

void

hasMore
hasMore: boolean;

Defined in: packages/ui/build/command/types.d.ts:34

total
total: number;

Defined in: packages/ui/build/command/types.d.ts:33

Type Aliases

Dialog

type Dialog = ReturnType<typeof Dialog>;

Defined in: packages/ui/build/command/command-dialog.svelte.d.ts:2


Empty

type Empty = ReturnType<typeof Empty>;

Defined in: packages/ui/build/command/command-empty.svelte.d.ts:2


FilterFunction

type FilterFunction = (value, search, keywords?) => number;

Defined in: packages/ui/build/command/types.d.ts:14

Parameters

Parameter Type
value string
search string
keywords? string[]

Returns

number


Group

type Group = ReturnType<typeof Group>;

Defined in: packages/ui/build/command/command-group.svelte.d.ts:4


GroupHeading

type GroupHeading = ReturnType<typeof GroupHeading>;

Defined in: packages/ui/build/command/command-group-heading.svelte.d.ts:2


GroupItems

type GroupItems = ReturnType<typeof GroupItems>;

Defined in: packages/ui/build/command/command-group-items.svelte.d.ts:2


Input

type Input = ReturnType<typeof Input>;

Defined in: packages/ui/build/command/command-input.svelte.d.ts:2


List

type List = ReturnType<typeof List>;

Defined in: packages/ui/build/command/command-list.svelte.d.ts:2


Loading

type Loading = ReturnType<typeof Loading>;

Defined in: packages/ui/build/command/command-loading.svelte.d.ts:2


Root

type Root = ReturnType<typeof Root>;

Defined in: packages/ui/build/command/command.svelte.d.ts:2


Separator

type Separator = ReturnType<typeof Separator>;

Defined in: packages/ui/build/command/command-separator.svelte.d.ts:2


Shortcut

type Shortcut = ReturnType<typeof Shortcut>;

Defined in: packages/ui/build/command/command-shortcut.svelte.d.ts:2

Variables

Dialog

const Dialog: Component;

Defined in: packages/ui/build/command/command-dialog.svelte.d.ts:2


Empty

const Empty: Component;

Defined in: packages/ui/build/command/command-empty.svelte.d.ts:2


Group

const Group: Component;

Defined in: packages/ui/build/command/command-group.svelte.d.ts:4


GroupHeading

const GroupHeading: Component;

Defined in: packages/ui/build/command/command-group-heading.svelte.d.ts:2


GroupItems

const GroupItems: Component;

Defined in: packages/ui/build/command/command-group-items.svelte.d.ts:2


Input

const Input: Component;

Defined in: packages/ui/build/command/command-input.svelte.d.ts:2


List

const List: Component;

Defined in: packages/ui/build/command/command-list.svelte.d.ts:2


Loading

const Loading: Component;

Defined in: packages/ui/build/command/command-loading.svelte.d.ts:2


Root

const Root: Component;

Defined in: packages/ui/build/command/command.svelte.d.ts:2


Separator

const Separator: Component;

Defined in: packages/ui/build/command/command-separator.svelte.d.ts:2


Shortcut

const Shortcut: Component;

Defined in: packages/ui/build/command/command-shortcut.svelte.d.ts:2

Functions

buildCustomFilterFn()

function buildCustomFilterFn<T, AP>(options): (optionValue, search) => number;

Defined in: packages/ui/build/command/custom-filter.d.ts:2

Type Parameters

Type Parameter
T
AP extends Record<string, unknown>

Parameters

Parameter Type
options TOption<T, AP>[]

Returns

(optionValue, search) => number