prosekit/svelte/autocomplete
AutocompleteEmptyProps
Props for the AutocompleteEmpty component.
AutocompleteItemProps
Props for the AutocompleteItem component.
onSelect
Type:
undefined | ((event: CustomEvent<void>) => void)
value
The value of the item, which will be matched against the query.
If not provided, the value is the item's text content.
Type:
string
Default:
""
AutocompleteListProps
Props for the AutocompleteList component.
onValueChange
Type:
undefined | ((event: string) => void)
AutocompletePopoverProps
Props for the AutocompletePopover component.
boundary
Type:
Boundary
Default:
"The body element"
fitViewport
Type:
boolean
Default:
true
hoist
Type:
boolean
Default:
true
inline
Type:
boolean
Default:
true
offset
The distance between the popover and the hovered block.
Type:
OffsetOptions
Default:
4
onOpenChange
Type:
undefined | ((event: boolean) => void)
onQueryChange
Type:
undefined | ((event: string) => void)
overflowPadding
Type:
number
Default:
8
placement
The placement of the popover, relative to the text cursor.
Type:
Placement
Default:
"bottom-start"
regex
The regular expression to match the query text to autocomplete.
Type:
null | RegExp
Default:
null
AutocompleteEmpty
Type: typeof SvelteComponent
AutocompleteItem
Type: typeof SvelteComponent
AutocompleteList
Type: typeof SvelteComponent
AutocompletePopover
Type: typeof SvelteComponent