Inline Token Field
Live example
Inline Token Field
Installation
npx shadcn@latest add https://hextech-ui.vercel.app/r/token-field.jsonAPI reference
These are the main Inline Token Field options. See the exported TypeScript types for inherited native or primitive props.
| Prop | Type | Default |
|---|---|---|
label | string (required) | — |
value / defaultValue | TokenFieldValue | empty |
onValueChange | (value: TokenFieldValue) => void | — |
required / maxLength | native validation bridge | false / unlimited |
serialization | text | json | text |
Usage notes
Use TokenFieldValue for text and atomic tokens. Pair value with onValueChange for controlled editing. Define serialization intentionally for form submission; raw HTML is not the value format.