Tokenizer
Tag/token input for managing multiple values with keyboard support.
Generated from the package's public source.
API
Inputcomponent
Input(props: TokenizerInputProps): Element
Props
class?stringonBlur?EventHandler<HTMLInputElement, FocusEvent>onFocus?EventHandler<HTMLInputElement, FocusEvent>onInput?EventHandler<HTMLInputElement, InputEvent>onKeyDown?EventHandler<HTMLInputElement, KeyboardEvent>ref?(el: HTMLInputElement) => voidstyle?string | CSSProperties
Rootcomponent
Root(props: TokenizerRootProps): Element
Props
allowDuplicates?boolean— Whether duplicate tokens are allowed. Default: false.class?stringdefaultValue?string[]— Default token values (uncontrolled).delimiter?string | string[]— Characters/keys that trigger token creation. Default: ['Enter', ','].disabled?booleanid?string— Element id.invalid?booleanmax?number— Maximum number of tokens allowed.name?string— Form field name.onTokenAdd?(token: string) => void— Called when a single token is added.onTokenRemove?(token: string, index: number) => void— Called when a single token is removed.onValueChange?(tokens: string[]) => void— Called when the token list changes.placeholder?string— Placeholder for the input.readOnly?booleanrequired?booleanstyle?string | CSSPropertiesvalue?string[]— Controlled list of token values.
children: Element
Tokencomponent
Token(props: TokenizerTokenProps): Element
Props
class?stringdisabled?booleanindexnumber— Index of the token in the list.style?string | CSSPropertiesvaluestring— The token value this chip represents.
children: Element
TokenizerInputPropsinterface
Props
class?stringonBlur?EventHandler<HTMLInputElement, FocusEvent>onFocus?EventHandler<HTMLInputElement, FocusEvent>onInput?EventHandler<HTMLInputElement, InputEvent>onKeyDown?EventHandler<HTMLInputElement, KeyboardEvent>ref?(el: HTMLInputElement) => voidstyle?string | CSSProperties
TokenizerReasontype
TokenizerRootPropsinterface
Props
allowDuplicates?boolean— Whether duplicate tokens are allowed. Default: false.class?stringdefaultValue?string[]— Default token values (uncontrolled).delimiter?string | string[]— Characters/keys that trigger token creation. Default: ['Enter', ','].disabled?booleanid?string— Element id.invalid?booleanmax?number— Maximum number of tokens allowed.name?string— Form field name.onTokenAdd?(token: string) => void— Called when a single token is added.onTokenRemove?(token: string, index: number) => void— Called when a single token is removed.onValueChange?(tokens: string[]) => void— Called when the token list changes.placeholder?string— Placeholder for the input.readOnly?booleanrequired?booleanstyle?string | CSSPropertiesvalue?string[]— Controlled list of token values.
children: Element
TokenizerTokenPropsinterface
Props
class?stringdisabled?booleanindexnumber— Index of the token in the list.style?string | CSSPropertiesvaluestring— The token value this chip represents.
children: Element
TokenizerTokenRemovePropsinterface
Props
class?stringstyle?string | CSSProperties
children: Element
TokenRemovecomponent
TokenRemove(props: TokenizerTokenRemoveProps): Element
Props
class?stringstyle?string | CSSProperties
children: Element