Theme:
Ui3nButton
Button component with various styles and capabilities.
Props
| Name | Type | Default value | Description |
|---|---|---|---|
type | "primary" | "icon" | "secondary" | "tertiary" | "outline" | "custom" | undefined | "primary" | Button type |
size | "regular" | "small" | "large" | undefined | "regular" | Button size |
square | boolean | undefined | The unrounded button | |
block | boolean | undefined | Whether to stretch the button to the full width of the parent block | |
textColor | string | undefined | Button text color | |
color | string | undefined | Button background color | |
elevation | boolean | undefined | Add a raised effect to the button | |
icon | string | undefined | The icon displayed on the button | |
iconSize | string | number | undefined | Button icon size | |
iconColor | string | undefined | Button icon color | |
iconPosition | "right" | "left" | undefined | "right" | Button icon position |
disabled | boolean | undefined | false | Put component in disabled mode |
Events
| Event | Value type | Description |
|---|---|---|
click | value: Event | |
init | value: HTMLButtonElement | |
enter | value: HTMLButtonElement | |
focus | value: Event | |
blur | value: Event |
Slots
| Name | Props | Description |
|---|---|---|
default | Default slot |
Usage Examples
Simple button
Simple button
Simple button usage
Button types
Button types
Different button types: primary, secondary, tertiary, icon, custom
Button sizes
Button sizes
Regular and small button sizes
Buttons with icons
Buttons with icons
Buttons with icons on the left or right side
Button states
Button states
Disabled, block and elevated buttons