prosekit/web/autocomplete
AutocompleteEmptyElement
Renames and re-exports AutocompleteEmpty
AutocompleteItemElement
Renames and re-exports AutocompleteItem
AutocompleteListElement
Renames and re-exports AutocompleteList
AutocompletePopoverElement
Renames and re-exports AutocompletePopover
AutocompleteEmptyProps
Extends
EmptyObject
AutocompleteItemProps
Properties
onSelect
onSelect:
null
|VoidFunction
The function to call when the item is selected.
Default
null
value
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
Extends
Pick
<ListboxProps
,"filter"
>
Properties
editor
editor:
null
|Editor
<any
>
AutocompletePopoverProps
Extends
OverlayPositionerProps
Properties
boundary
boundary:
Boundary
Default
"The body element"
Overrides
OverlayPositionerProps.boundary
editor
editor:
null
|Editor
<any
>
The ProseKit editor instance.
Default
null
fitViewport
fitViewport:
boolean
Default
true
Overrides
OverlayPositionerProps.fitViewport
hoist
hoist:
boolean
Default
true
Overrides
OverlayPositionerProps.hoist
inline
inline:
boolean
Default
true
Overrides
OverlayPositionerProps.inline
offset
offset:
null
|OffsetOptions
The distance between the popover and the hovered block.
Default
4
Overrides
OverlayPositionerProps.offset
onOpenChange
onOpenChange:
null
| (open
) =>void
A callback that is called when the open state changes.
onQueryChange
onQueryChange:
null
| (query
) =>void
A callback that is called when the query changes.
overflowPadding
overflowPadding:
number
Default
8
Overrides
OverlayPositionerProps.overflowPadding
placement
placement:
Placement
The placement of the popover, relative to the text cursor.
Default
"bottom-start"
Overrides
OverlayPositionerProps.placement
regex
regex:
null
|RegExp
The regular expression to match the query text to autocomplete.
Default
null
defaultAutocompleteEmptyProps
const
defaultAutocompleteEmptyProps:object
defaultAutocompleteItemProps
const
defaultAutocompleteItemProps:object
Type declaration
Name | Type | Default value |
---|---|---|
onSelect | null | null |
value | string | '' |
defaultAutocompleteListProps
const
defaultAutocompleteListProps:object
Type declaration
Name | Type | Default value |
---|---|---|
editor | null | null |
filter | (options ) => boolean | defaultFilter |
defaultAutocompletePopoverProps
const
defaultAutocompletePopoverProps:Readonly
<object
>
Type declaration
Name | Type | Default value |
---|---|---|
boundary | HTMLBodyElement | "clippingAncestors" | defaultBoundary |
editor | null | null |
fitViewport | true | true |
hoist | true | true |
inline | true | true |
offset | 4 | 4 |
onOpenChange | null | null |
onQueryChange | null | null |
overflowPadding | 8 | 8 |
placement | "bottom-start" | 'bottom-start' |
regex | null | null |