blackchalkv0.3.0
Components

Tabs

SketchTabs — hand-drawn tabbed panels.

SketchTabs renders a row of sketched tabs with the active panel below. It manages its own selection when uncontrolled, or you can drive it with activeIndex + onChange.

Default

import { SketchTabs } from "blackchalk";<SketchTabstabs={[  { label: "Overview", content: "The big picture." },  { label: "Specs", content: "The fine print." },  { label: "Reviews", content: "What people say." },]}/>

Props

PropTypeDefault
tabs{ label: string, content: ReactNode }[]
activeIndexnumber
onChange(index: number) => void

See it in the Storybook playground, or read the source.

On this page