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