element
shape
appearance
size
iconStart
iconEnd
State
<button kuiButton type="button">Save changes</button>| Name | Type | Default | Description |
|---|---|---|---|
| shape | 'solid' | 'soft' | 'outline' | 'ghost' | 'solid' | Surface treatment. Combines freely with appearance. |
| appearance | 'primary' | 'danger' | 'success' | 'warning' | null | null | Semantic color intent. Without an explicit value, solid and soft use primary colors and outline and ghost use their neutral defaults. |
| size | 'xs' | 'sm' | 'md' | 'lg' | 'md' | Control height and spacing size. Falls back to defaults.button.size, then the global defaults.size. |
| wrap | boolean | false | Allows long button text to wrap instead of truncating in narrow containers. |
| disabled | boolean | false | Disables button behavior. A button host gets the native disabled attribute; an anchor host gets aria-disabled="true", leaves the tab order and suppresses navigation. |
| loading | boolean | false | Centers a kuiLoader spinner over the button content, fades the content out while keeping its layout size, sets aria-busy="true" and behaves like disabled. The button keeps full opacity instead of dimming like a disabled one. |
| iconStart | KuiIconName | undefined | undefined | Renders a kui-icon resolved by registered name before the projected content, without hand-projecting kui-icon. |
| iconEnd | KuiIconName | undefined | undefined | Renders a kui-icon resolved by registered name after the projected content, without hand-projecting kui-icon. |
| provideKuiDefaults({ button }) | (defaults: KuiComponentDefaults) => Provider | - | Scopes repeated defaults for kuiButton in a component, route or feature subtree. A nested level merges with its parent per property. Use the defaults option of provideKikitaUi for the whole application. |
| KuiButtonOptions | interface | - | Shape of defaults.button: shape, appearance (null selects each shape neutral appearance) and size. It is the same shape as KuiButtonBaseOptions, shared with defaults.iconButton. |
| KuiDefaults | service | - | Injectable that reads and writes defaults at runtime: get(key) returns a Signal of the effective options, set and update write to the nearest level. |
| KuiButtonShape / KuiButtonAppearance | type aliases | - | Public unions of the shape and appearance values, exported for typed wrappers. |
| kuiProvideButtonOptions | deprecated function | - | Forwards { button, iconButton } (KuiButtonProviderOptions) to provideKuiDefaults. Deprecated, removed in 3.0; use provideKuiDefaults. |