Default
Show the codeHide the code
Default, code
function Removable() {
const [tags, setTags] = useState(['Design', 'Research', 'Writing', 'Prototyping']);
return (
<TagGroup label="Skills" hint="Press Backspace or Delete to remove the focused tag." onRemove={(keys) => setTags((t) => t.filter((x) => !keys.has(x)))}>
{tags.map((t) => <Tag key={t} id={t}>{t}</Tag>)}
</TagGroup>
);
}
<Removable />