import { useState } from 'react'; import { Screen, View, Text, Chip, Divider } from '@idealyst/components'; export const ChipExamples = () => { const [selectedChips, setSelectedChips] = useState>(new Set()); const [tags, setTags] = useState(['React', 'TypeScript', 'JavaScript', 'Node.js']); const toggleChip = (id: string) => { const newSelected = new Set(selectedChips); if (newSelected.has(id)) { newSelected.delete(id); } else { newSelected.add(id); } setSelectedChips(newSelected); }; const removeTag = (tag: string) => { setTags(tags.filter(t => t !== tag)); }; return ( Chip Examples Basic Chips Variants Filled (Default) Outlined Soft Sizes With Icons Deletable Chips {tags.map(tag => ( removeTag(tag)} intent="primary" type="outlined" /> ))} Click the X to remove tags Selectable Chips {['Option 1', 'Option 2', 'Option 3', 'Option 4'].map(option => ( toggleChip(option)} intent="primary" type="outlined" /> ))} Selected: {Array.from(selectedChips).join(', ') || 'None'} Clickable Chips alert('Chip clicked!')} intent="primary" /> console.log('Clicked')} type="outlined" intent="success" /> Disabled State {}} disabled /> {}} disabled /> Filter Example toggleChip('filter-all')} type="soft" intent="neutral" /> toggleChip('filter-active')} type="soft" intent="success" /> toggleChip('filter-completed')} type="soft" intent="primary" /> toggleChip('filter-archived')} type="soft" intent="neutral" /> Category Tags ); };