rButton
A highly customizable and reusable button component that supports both button and link behavior. It offers various styling options such as color themes, visual variants, sizes, and a loading state.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
href | string | '' | ❌ | If set, renders the component as a link instead of a button. |
color | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral' | 'primary' | ❌ | Theme color of the button. |
variant | 'solid' | 'outline' | 'soft' | 'subtle' | 'ghost' | 'solid' | ❌ | Visual style of the button. |
size | 'small' | 'base' | 'big' | 'base' | ❌ | Size of the button. |
isLoading | boolean | false | ❌ | Displays a loading spinner and disables slot content when true. |
class | ClassValue | '' | ❌ | Additional custom classes to apply to the button. |
Slots
| Name | Description |
|---|---|
default | Default content to render inside button. |
Emits
None
Usage Examples
Basic button
vue
<rButton>Click Me</rButton>