BetaPublic beta — Read the release notes
Documentation

Tokenizer

Tag/token input for managing multiple values with keyboard support.

Package
@solidiom/tokenizer
Version
0.6.0
Status
experimental

Generated from the package's public source.

API

Inputcomponent

                        Input(props: TokenizerInputProps): Element
                      

Props

class?
string
onBlur?
EventHandler<HTMLInputElement, FocusEvent>
onFocus?
EventHandler<HTMLInputElement, FocusEvent>
onInput?
EventHandler<HTMLInputElement, InputEvent>
onKeyDown?
EventHandler<HTMLInputElement, KeyboardEvent>
ref?
(el: HTMLInputElement) => void
style?
string | CSSProperties

View source

Rootcomponent

                        Root(props: TokenizerRootProps): Element
                      

Props

allowDuplicates?
boolean — Whether duplicate tokens are allowed. Default: false.
class?
string
defaultValue?
string[] — Default token values (uncontrolled).
delimiter?
string | string[] — Characters/keys that trigger token creation. Default: ['Enter', ','].
disabled?
boolean
id?
string — Element id.
invalid?
boolean
max?
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?
boolean
required?
boolean
style?
string | CSSProperties
value?
string[] — Controlled list of token values.

children: Element

View source

Tokencomponent

                        Token(props: TokenizerTokenProps): Element
                      

Props

class?
string
disabled?
boolean
index
number — Index of the token in the list.
style?
string | CSSProperties
value
string — The token value this chip represents.

children: Element

View source

TokenizerInputPropsinterface

Props

class?
string
onBlur?
EventHandler<HTMLInputElement, FocusEvent>
onFocus?
EventHandler<HTMLInputElement, FocusEvent>
onInput?
EventHandler<HTMLInputElement, InputEvent>
onKeyDown?
EventHandler<HTMLInputElement, KeyboardEvent>
ref?
(el: HTMLInputElement) => void
style?
string | CSSProperties

View source

TokenizerReasontype

View source

TokenizerRootPropsinterface

Props

allowDuplicates?
boolean — Whether duplicate tokens are allowed. Default: false.
class?
string
defaultValue?
string[] — Default token values (uncontrolled).
delimiter?
string | string[] — Characters/keys that trigger token creation. Default: ['Enter', ','].
disabled?
boolean
id?
string — Element id.
invalid?
boolean
max?
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?
boolean
required?
boolean
style?
string | CSSProperties
value?
string[] — Controlled list of token values.

children: Element

View source

TokenizerTokenPropsinterface

Props

class?
string
disabled?
boolean
index
number — Index of the token in the list.
style?
string | CSSProperties
value
string — The token value this chip represents.

children: Element

View source

TokenizerTokenRemovePropsinterface

Props

class?
string
style?
string | CSSProperties

children: Element

View source

TokenRemovecomponent

                        TokenRemove(props: TokenizerTokenRemoveProps): Element
                      

Props

class?
string
style?
string | CSSProperties

children: Element

View source