Component packs › Slate › Chalk Tabs

Chalk Tabs

The active tab is underlined in coloured chalk by a visible stick; the old line is rubbed out and leaves dust.

Chalk Tabs is a tabs from Slate, a component pack with 6 chalkboard components: Controls written in chalk on a slate: strokes that draw themselves and rub out to dust. Price: $2 for the whole pack.

Built with: grainy chalk engine, stroke drawn over time, smudge on erase.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Chalk Tabs props

PropTypeDefaultDescription
tabsChalkTabsItem[]
indexnumber
labelstring
widthnumber380Board width in px. Default 380.
darkboolean
onChange(index: number) => void
autoplaynumber | falseShowcase mode: moves to the next tab every N ms while visible.

Methods on the ref

Use it in React

import ChalkTabs from './ChalkTabs';

<ChalkTabs />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Slate

Good for: Checkboxes.