Button
Accessible action button recipes with six variants and seven sizes.
Usage
import { button } from "coatx/button";
export const SaveButton = () => (
<button type="button" {...button({ variant: "default", size: "sm" })}>
Save changes
</button>
);
Exports (coatx/button)
| Export | Description |
|---|---|
button(options?) |
Button recipe returning { class, style } |
buttonStyles |
Compiled StyleX style map for direct composition |
Options
| Option | Type | Default |
|---|---|---|
variant |
"default", "destructive", "outline", "secondary", "ghost", "link" |
"default" |
size |
"default", "xs", "sm", "lg", "icon", "iconSm", "iconLg" |
"default" |
disabled |
boolean |
false |
invalid |
boolean |
false |