>skeehn

tabs

Tabbed navigation with dither tab

Coretabs.csstabs.js

Installation

$npx skeehn add tabs

Preview

Live preview of the component appears here.

Props

PropTypeDefaultDescription
itemsTabItem[][]Array of tab definitions with label, value, and content
defaultValuestringInitially active tab value

Usage

tabs.tsx
1import { Tabs } from '@skeehn/react';23export function ContentTabs() {4  return (5    <Tabs6      items={[7        { label: 'Preview', value: 'preview', content: <p>Live preview</p> },8        { label: 'Code', value: 'code', content: <pre>Code here</pre> },9      ]}10      defaultValue="preview"11    />12  );13}