- Name
pressed- Kind
- property
- Type
boolean- Requirement
- required
DocsAPI referenceUI machinestoggle-button
toggle-button machine
The public state machine contract for @grassroot/ui-machines/toggle-button. The machine owns behaviour; the matching headless layer owns composition.
@grassroot/ui-machines/toggle-button
Package
Service example
toggle-button.tsts
import { createService } from "@grassroot/statechart";import { toggleButtonMachine } from "@grassroot/ui-machines/toggle-button"; const service = createService(toggleButtonMachine, { input: {} });service.start();service.send({ type: "…" });service.stop();10 of 10