# Component/BoxTabs > Props: component-boxtabs.props.txt ## Examples ### Base ```tsx { render: args => { const [activeTab, setActiveTab] = useState('tab-1'); const handleChange = (activeTab: string) => { setActiveTab(activeTab); }; return Label Label Label Label ; } } ``` ### Disabled ```tsx { render: () => { const [activeTab, setActiveTab] = useState('tab-1'); const handleChange = (id: string) => setActiveTab(id); return Normal Disabled alert('Dots clicked!') }}> Normal alert('Dots clicked!') }} disabled> Disabled ; } } ``` ### Scroll ```tsx { render: args => { const [activeTab, setActiveTab] = useState('tab-1'); const handleChange = (activeTab: string) => { setActiveTab(activeTab); }; return
{Array.from({ length: 20 }, (_, i) => { return {`Label-${i}`} ; })}
; } } ``` ### With Action Dropdown Item ```tsx { render: () => { const [activeTab, setActiveTab] = useState('tab-1'); const tabs = [{ id: 'tab-1', label: 'Selected' }, { id: 'tab-2', label: 'Unselected' }, { id: 'tab-3', label: 'Other Tab' }, { id: 'tab-4', label: 'Disabled Tab', disabled: true }]; return {tabs.map(tab => { return ; }} options={[{ label: 'Option 1', value: 'option-1' }, { label: 'Option 2', value: 'option-2' }]} />}> {tab.label} )} ; } } ``` ### With Action Icon ```tsx { render: () => { const [activeTab, setActiveTab] = useState('tab-1'); const handleChange = (id: string) => setActiveTab(id); return { alert('Dots clicked!'); } }}> Selected { alert('Dots clicked!'); } }}> Unselected (custom icon) ; } } ``` ### With Add Button ```tsx { render: () => { const [activeTab, setActiveTab] = useState('tab-1'); const [tabs, setTabs] = useState([{ id: 'tab-1', label: 'Label 1' }, { id: 'tab-2', label: 'Label 2' }]); const handleChange = (id: string) => { setActiveTab(id); }; const handleAdd = () => { const newId = `tab-${tabs.length + 1}`; setTabs([...tabs, { id: newId, label: `Label ${tabs.length + 1}` }]); setActiveTab(newId); }; return {tabs.map(tab => {tab.label} )} ; } } ``` ### With Dropdown Add Button ```tsx { render: () => { const [activeTab, setActiveTab] = useState('tab-1'); const [tabs, setTabs] = useState([{ id: 'tab-1', label: 'Label 1' }, { id: 'tab-2', label: 'Label 2' }]); const handleChange = (id: string) => { setActiveTab(id); }; const handleAdd = () => { const newId = `tab-${tabs.length + 1}`; setTabs([...tabs, { id: newId, label: `Label ${tabs.length + 1}` }]); setActiveTab(newId); }; return } options={[{ label: 'Add tab', value: 'add-tab' }]} />}> {tabs.map(tab => {tab.label} )} ; } } ```