Skip to content
DocsComponentsTemplatesThemesPlayground
Search
Switch to dark mode
Community
GitHub
Get started
Type to search
↑↓Navigate↵SelectEscClose
Components
Overview
App Shell
App Shell
useAppShellMobile
Aspect Ratio
Avatar
Avatar
Avatar Group
Avatar Group Overflow
Avatar Status Dot
Badge
Banner
Blockquote
Breadcrumbs
Breadcrumb Item
Breadcrumbs
Button
Button
Button Group
Icon Button
Toggle Button
Toggle Button Group
Calendar
Card
Card
Clickable Card
Selectable Card
Carousel
Chat
Chat Composer
Chat Composer Drawer
Chat Composer Input
Chat Composer Token Element
Chat Dictation Button
Chat Layout
Chat Layout Scroll Button
Chat Message
Chat Message Bubble
Chat Message List
Chat Message Metadata
Chat Send Button
Chat System Message
Chat Tokenized Text
Chat Tool Calls
Checkbox
Checkbox Input
Checkbox List
Checkbox List Item
Citation
Code
Code Block
Collapsible
Collapsible
Collapsible Group
useCollapsible
Command Palette
Command Palette
Command Palette Empty
Command Palette Footer
Command Palette Group
Command Palette Input
Command Palette Item
Command Palette List
Context Menu
Context Menu
Context Menu Item
Date Input
Date Input
Date Range Input
Date Time Input
Dialog
Alert Dialog
Dialog
Dialog Header
useImperativeAlertDialog
useImperativeDialog
Divider
Dropdown Menu
Dropdown Menu
Dropdown Menu Item
Empty State
Field
Field
Field Label
Field Status
Input Group
Input Group Text
File Input
Heading
Hover Card
Hover Card
useHoverCard
Icon
Item
Kbd
Layout
Center
Form Layout
Grid
Grid Span
H Stack
Layout
Layout Content
Layout Footer
Layout Header
Layout Panel
Section
Stack Item
V Stack
Lightbox
Link
List
List
List Item
Markdown
Metadata List
Metadata List
Metadata List Item
More Menu
Navigation
Mobile Nav
Mobile Nav Toggle
Nav Heading Menu
Nav Icon
Side Nav
Side Nav Collapse Button
Side Nav Heading
Side Nav Item
Side Nav Section
Top Nav
Top Nav Heading
Top Nav Item
Top Nav Mega Menu
Top Nav Mega Menu Featured Card
Top Nav Mega Menu Item
Top Nav Menu
Number Input
Outline
Overflow List
Overlay
Pagination
Popover
Popover
usePopover
Power Search
Progress Bar
Radio
Radio List
Radio List Item
Resizable
Resize Handle
useResizable
Segmented Control
Segmented Control
Segmented Control Item
Selector
Multi Selector
Selector
Selector Option
Skeleton
Slider
Spinner
Status Dot
Switch
Table
Table
Table Cell
Table Header Cell
Table Row
useTableColumnSettings
useTableFiltering
useTableFilterState
useTablePagination
useTableSelection
useTableSelectionState
useTableSortable
Tabs
Tab
Tab List
Tab Menu
Text
Text Area
Text Input
Thumbnail
Time Input
Timestamp
Toast
Toast
useToast
Token
Tokenizer
Toolbar
Tooltip
Tooltip
useTooltip
Tree List
Typeahead
Base Typeahead
Typeahead
Typeahead Item
Utilities
Layer Provider
Link Provider
Media Theme
Syntax Theme
Theme
useClickableContainer
useEntryAnimation
useFocusTrap
useGridFocus
useImageMode
useInputContainer
useLayer
useListFocus
useMediaQuery
useOverflow
useScrollLock
useScrollOverflow
useStreamingText
useTheme
DocsChangelogCommunityBlogComponentsTemplatesThemesPlayground
GitHub
Facebook
Instagram
Threads
X
Terms of usePrivacy policy
©2026 Meta Platforms, Inc.
Token@astryxdesign/core v0.0.15 · Token

Usage

Token is a small, inline element for representing discrete pieces of associated data, like tags, categories, or selections. Use it to label content, show active filters, or represent removable items like selected recipients in a compose field.
ts
import {Token} from '@astryxdesign/core/Token'

Best practices

GuidancePractices
DoUse color to distinguish categories (for example, green for "Active", red for "Blocked", blue for "In Review") so users can scan status at a glance.
DoProvide an onRemove callback when tokens represent user selections that can be undone, like filters or multi-select values.
DoAdd a leading icon when it helps identify the token type faster, like a person icon for user tokens or a tag icon for labels.
DoKeep labels short: one to three words. Tokens truncate with ellipsis when the text overflows.
Don'tDon't use tokens for primary actions or navigation; use Button or Link instead. Tokens are for displaying metadata, not triggering workflows.
Don'tDon't hide the label unless the icon alone is universally understood. A color dot without text is ambiguous.
Don'tDon't mix too many colors in one token group. Stick to two or three meaningful colors so the palette stays scannable.

Examples

Common configurations, variations, and states.
Token — Clickable
Interactive tokens that respond to clicks. Use for toggleable filters or tokens that open a detail view when selected.
Token — Colors
All 11 color variants in default and disabled states. Use color to categorize entities or convey status at a glance.
Token — End Content
Tokens with trailing content like a count badge or status indicator after the label. Use for notification counts, item quantities, or compact status info.
Token — Icon
Tokens with a leading icon that identifies the entity type. Use when the icon helps users recognize the token category faster, like a user icon for people or a tag icon for labels.
Token — Removable
Tokens with a dismiss button for selections the user can undo. Use in multi-select fields, active filters, or any list of user-chosen items.