Button
freeButton gives product actions a consistent hierarchy across forms, dialogs, and toolbars.
Installation
Add this component with the NateUI CLI.
Examples
Variants
Sizes
Shapes
States
Destructive
Icons
Block
API
Button accepts the props below plus native props for the rendered element.
| Prop | Description | Type | Default |
|---|---|---|---|
asElement | Root element or component rendered by the button. | ElementType | 'button' |
active | Marks the button as active and applies the active visual state. | boolean | false |
block | Expands the button to the full width of its container. | boolean | false |
children | Button label or content. | ReactNode | - |
className | Static class string or state-aware class callback. | ButtonClassName | - |
clickFeedback | Enables the press-down transform feedback on activation. | boolean | true |
destructive | Switches the button into the destructive intent palette. | boolean | false |
disabled | Prevents interaction and applies the disabled visual state. | boolean | false |
icon | Icon content rendered with, or instead of, the label. | string | ReactNode | - |
iconAlignment | Icon placement when both icon and label are present. | ButtonIconAlignment | 'start' |
loading | Shows a spinner and prevents repeat activation. | boolean | false |
onClick | Click handler invoked only when the button is not disabled or loading. | ButtonClickHandler | - |
ref | Ref forwarded to the underlying button element. | Ref<HTMLButtonElement> | - |
shape | Border radius treatment. | ButtonShape | 'round' |
size | Control size. Falls back to InputGroup size, then ConfigProvider control size. | ControlSize | 'md' from ConfigProvider |
variant | Visual style. | ButtonVariant | 'default' |
...nativeProps | Native props for the rendered element, excluding Button-owned props. | NativeButtonProps<E> | - |