Components
Theme Toggle
SketchThemeToggle — a hand-drawn toggle that switches the page between light and dark themes.
SketchThemeToggle wraps SketchToggle with built-in theme state: it reads
data-theme from <html>, flips it on change, and persists the preference to
localStorage. Drop it anywhere — no provider needed.
Default
import { SketchThemeToggle } from "blackchalk";<SketchThemeToggle />Custom label
import { SketchThemeToggle } from "blackchalk";<SketchThemeToggle label="Night theme" />Props
| Prop | Type | Default |
|---|---|---|
label | string | "Dark mode" |
style | CSSProperties | — |
See it in the Storybook playground, or read the source.