Component packs › Tangram › Shape Toggle
Stopped, the pieces tile a square; playing, the same seven pieces tile a triangle pointing right.
Shape Toggle is a toggle from Tangram, a component pack with 6 tangram controls: Seven tangram pieces that rearrange into every state of your interface. Price: $2 for the whole pack.
Built with: square to play arrow, aria-pressed, one piece at a time.
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.
| Prop | Type | Default | Description |
|---|---|---|---|
playing | boolean | ||
label | string | Accessible name, e.g. "Preview". | |
disabled | boolean | ||
onChange | (playing: boolean) => void | ||
theme | "light" | "dark" | ||
autoplay | number | false | Showcase mode: toggles itself every N ms while visible. |
readonly playing: booleansetPlaying(playing: boolean, silent?: boolean): voiddestroy(): voidimport ShapeToggle from './ShapeToggle';
<ShapeToggle />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: 404 and empty states.