Skip to Content

Thermal Button

Heat-reactive button: a dark monospace-label button that heats on hover, flashes to ember on press and grays to ash when a Thermal Provider reports depletion. Built on motion; the pulse respects reduced motion.

Installation

pnpm dlx shadcn@latest add @01orbital/thermal-button

Usage

import { ThermalButton } from "@/components/thermal/thermal-button"

export default function ThermalButtonDemo() {
  return (
    <div className="grid w-full flex-wrap place-items-center gap-4 p-6">
      <ThermalButton label="Ignite" />
      <ThermalButton label="Outline" variant="outline" />
    </div>
  )
}

This example installs with everything it uses:

pnpm dlx shadcn@latest add @01orbital/thermal-button-demo

Examples

Machine Control Thermal Buttonthermal-button-kiln-control

Thermal button example: a square-edged action on charcoal with ember grain and machine labeling. Shows the Thermal Button as a kiln or equipment control.

pnpm dlx shadcn@latest add @01orbital/thermal-button-kiln-control

API reference

A 48px-tall button for the thermal set, with its label in uppercase mono. Hover or keyboard focus warms its fill and pulses its border; a press flashes it orange for 0.9 seconds.

Inside a ThermalProvider, it dims to ash while the status is "DEPLETED". A press lights only this button: to heat the scene, call addHeat from useThermal in onClick. Calling preventDefault() there skips the flash. With reduced motion on, the border holds steady instead of pulsing.

Prop

Type

It also accepts Motion's animation props.

Dependencies

npm: class-variance-authority, cn, motion. The CLI installs them for you.

Requires these pieces. The CLI adds each one that is missing and won't replace a file you already have unless you choose to:

Used in blocks

2 blocks are built with Thermal Button:

Last updated on