Button
Button component that forwards props to <button> or <a> when href is provided.
Usage
import {Button} from 'kinu';
<Button variant="outline">Action</Button>
Exports
| Name | Description | Rendered HTML |
|---|---|---|
| Button | Interactive action control | p="button" |
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | ButtonVariant |
'default' | Visual style variant. |
| size | ButtonSize |
'md' | Size preset for the button. |
| loading | boolean |
— | Shows a pending state and disables interactions. |
| href | string |
— | When provided, renders the Button as an anchor element. |
| target | `string | undefined | null` |
| rel | `string | undefined | null` |
| onClick | `(event: MouseEvent) => void | null` | — |
| disabled | boolean |
— | Disables interactions and applies disabled styling. |
| type | `string | undefined | null` |
Notes
- Use the loading attribute to reflect pending state without extra handlers.
- Supports size attributes (sm, md, lg, icon) controlled purely with CSS.
_Source: src/components/button/index.tsx