Button โ
A clickable button or link element. Toggle Vue / CSS to switch the live demo and source together.
Basic โ
Default colors across the palette.
Vue SFC
Sizes โ
xs, sm, md, lg, xl.
Vue SFC
Variants โ
Solid, outline, tonal and gradient.
Vue SFC
Shapes โ
Square (default) and pill.
Vue SFC
Text with icon โ
Icon slot with left or right position.
Vue SFC
States โ
Disabled, loading and full width (width="100%").
Vue SFC
Badges โ
Notification badge in four colors.
Vue SFC
Link buttons โ
Renders as <a> when href is set.
Vue SFC
Button type โ
button, submit, reset.
Vue SFC
Icon buttons โ
Icon-only buttons with optional badge or tooltip.
Vue SFC
FAB โ
Floating Action Button styles.
Vue SFC
Customized โ
Override per-element styling with the cssClass prop (Vue) or extra utility classes (CSS).
Vue SFC
Width & height โ
Set width, height, min-width, max-width, min-height or max-height โ each takes a CSS string ("220px", "80%") or a number (px). Use width="100%" for a full-width button (replaces the old fullWidth).
Vue SFC
Types โ
Import
import { ButtonProps } from 'mono-helper'| Prop | Value | Default | Description |
|---|---|---|---|
size | 'sm' | 'md' | 'lg' | 'xs' | 'xl' | 'md' | Visual size of the button. |
color | 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'teal' | 'purple' | 'dark' | 'light' | 'primary' | Color theme of the button. |
variant | 'solid' | 'outline' | 'tonal' | 'gradient' | 'solid' | Visual style variant (solid, outline, tonal, gradient). |
gradient | 'purple' | 'dark' | 'ocean' | 'mint' | 'sunset' | โ | Gradient preset applied when variant is gradient. |
shape | 'square' | 'pill' | 'circle' | 'square' | Corner shape of the button (square, pill, circle). |
disabled | boolean | false | Disables interaction and dims the button. |
loading | boolean | false | Shows a loading state and blocks clicks. |
width | string | number | โ | Explicit sizing. Each accepts a CSS length string (`"220px"`, `"80%"`) or a number (interpreted as px). Use `width="100%"` for a full-width button. |
height | string | number | โ | โ |
minWidth | string | number | โ | โ |
maxWidth | string | number | โ | โ |
minHeight | string | number | โ | โ |
maxHeight | string | number | โ | โ |
href | string | โ | Renders the button as an anchor with this URL. |
target | string | โ | Anchor target window when href is set. |
type | 'button' | 'submit' | 'reset' | 'button' | Native button type attribute. |
iconPosition | 'left' | 'right' | 'left' | Placement of the icon relative to the text. |
badge | string | โ | Badge text shown on the button. |
badgeColor | 'red' | 'green' | 'orange' | 'cobalt' | 'red' | Color of the badge. |
iconOnly | boolean | false | Renders an icon-only button without text. |
fab | boolean | false | Styles the button as a floating action button. |
round | boolean | false | Applies fully rounded corners. |
circle | boolean | false | Renders the button as a circle. |
glass | boolean | false | Applies a translucent glass effect. |
tooltip | string | โ | Tooltip text shown on hover. |
ariaLabelText | string | โ | Accessible label text for screen readers. |
cssClass | ButtonCssClass | {} | Per-element class overrides. |