@objectifthunes/whiteboard
WHITEBOARD DASHBOARD

FilterTabs

Compact filter tabs built from Buttons — the active option is primary, the rest secondary. No custom tab CSS.


PREVIEW

Showing: all

SOURCE
import { FilterTabs } from '@objectifthunes/whiteboard'

const [status, setStatus] = useState<'all' | 'draft' | 'published'>('all')

<FilterTabs
  options={[
    { value: 'all', label: 'All' },
    { value: 'draft', label: 'Drafts' },
    { value: 'published', label: 'Published' },
  ]}
  value={status}
  onChange={setStatus}
/>
NOTES

Generic over the value type: FilterTabs<T extends string>, so onChange hands back your union, not a bare string.

There is no custom tab CSS — the active option is a primary Button, the rest secondary. One obvious selected state, and any Button styling you theme applies here too.