Button
A semantic, focusable terminal action with theme variants, disabled state, and keyboard activation.
Overview
A semantic, focusable terminal action with theme variants, disabled state, and keyboard activation.
Installation
npx @mwillbanks/tuil add buttonThe CLI writes source-owned components beneath the destination configured in
tuil.config.ts; the default import below assumes src/components/tuil.
Loading executable example…
Components and subcomponents
| API | Signature | Description |
|---|---|---|
Button | export Button | Public export Button. |
Interaction
Enter and Space invoke onPress while the button is enabled.
API and events
onPress may be synchronous or asynchronous.
Every interactive component publishes semantic roles, labels, state, and focus
identity through the renderer's SemanticRegistry. Callback failures flow to
the owning application's error boundary.
Example
import type { ComponentProps } from "react";
import { Button } from "@/components/tuil/components/button";
export function Example(props: ComponentProps<typeof Button>) {
return <Button {...props} />;
}Registry-installed components are source-owned: customize the generated file in your application, and use the package reference for the shared runtime contracts.