Button
input
Button: a pressable button with a label and visual variants
Terminal
$termuijs render button
Installation
$ bunx termuijs add button
Copies the source into src/components/button/ and installs @termuijs/core, @termuijs/motion, @termuijs/widgets.
Usage
ts
import { Button } from '@termuijs/widgets'ts
new Button(label: string, style: Partial<Style> = {}, opts: ButtonOptions = {})API Reference
Button
| Prop | Type | Required | Description |
|---|---|---|---|
label | string | required | — |
variant | ButtonVariant | optional | — |
disabled | boolean | optional | — |
onPress | () => void | optional | — |
color | Color | optional | — |
loading | boolean | optional | Show a loading spinner and suppress activation while true (default: false) |
loadingText | string | optional | Label to display while loading (e.g |