About
Tokenizer is a multi-select input that lets users search, select, and manage multiple items displayed as removable chips. Use it when users need to build a set of selections from a searchable data source, like adding team members, applying tags, or choosing filters. Astryx by Meta. Source: https://astryx.atmeta.com/components/Tokenizer
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Astryx Tokenizer to your project and fits it to your theme.
Code
How Astryx Tokenizer 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-tokenizer.tsx. */
import '@/components/ui/astryx-tokenizer-utils/astryx-preview.css';
import {useState} from 'react';
import {Tokenizer} from '@/components/ui/astryx-tokenizer';
import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';
const tags: SearchableItem[] = [
{id: '1', label: 'Design'},
{id: '2', label: 'Engineering'},
{id: '3', label: 'Marketing'},
{id: '4', label: 'Product'},
{id: '5', label: 'Research'},
{id: '6', label: 'Sales'},
];
const source: SearchSource = {
search: (query: string) =>
tags.filter(tag => tag.label.toLowerCase().includes(query.toLowerCase())),
bootstrap: () => tags,
};
function OfficialSample() {
const [value, setValue] = useState<SearchableItem[]>([tags[0], tags[1]]);
return (
<div style={{display: 'grid', width: '100%', gridTemplateColumns: 'minmax(0, 1fr)'}}>
<Tokenizer
label="Tags"
placeholder="Search..."
searchSource={source}
value={value}
onChange={setValue}
/>
</div>
);
}
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: 400}}>
<OfficialSample />
</div>
</div>
);
}







