About
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. Astryx by Meta. Source: https://astryx.atmeta.com/components/Token
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Astryx Token to your project and fits it to your theme.
Code
How Astryx Token is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
'use client';
/* Copyright (c) 2026 Meta Platforms, Inc. See MIT notice in astryx-token.tsx. */
import '@/components/ui/astryx-token-utils/astryx-preview.css';
import {useState} from 'react';
import {Token} from '@/components/ui/astryx-token';
import {Stack} from '@astryxdesign/core/Layout';
const filters = [
{label: 'Status: Open', color: 'green'},
{label: 'Priority: High', color: 'red'},
{label: 'Team: Design', color: 'purple'},
] as const;
function OfficialSample() {
const [active, setActive] = useState<readonly typeof filters[number][]>(filters);
return (
<Stack direction="horizontal" gap={2} wrap="wrap" role="group" aria-label="Active filters">
{active.map(filter => (
<Token
key={filter.label}
label={filter.label}
color={filter.color}
onRemove={() => setActive(current => current.filter(item => item.label !== filter.label))}
/>
))}
</Stack>
);
}
export default function Demo() {
return (
<div className="astryx-demo" data-astryx-theme="neutral" data-theme="light">
<div className="astryx-demo-content" data-centered style={{maxWidth: 410}}>
<OfficialSample />
</div>
</div>
);
}







