Skip to content

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, xxl.

Vue SFC

Variants ​

Solid, outline, tonal and gradient. Pick a color to see how it combines with each one β€” solid fills with it, outline uses it for the border and text, tonal is a soft tint of the same hue.

gradient is the exception: it paints a preset ramp, so it takes a gradient name rather than a color, and has its own picker below.

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

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

Button with input ​

Buttons share the xs–xxl heights of the form controls, so they line up when paired inline.

Vue SFC

Throttle & debounce ​

Rate-limit clicks without writing a timer in your handler. throttle and debounce are backed by p-throttle and p-debounce, and each emits its own event when it actually executes.

Vue SFC

Both take the option object or a bare number shorthand (debounce="300"); a spinning button blocks, but a debounce still re-arms on repeat clicks so it runs once you stop.

Async loading ​

Bind the click's work as handler β€” its promise drives the button's own spinner, so there's no loading flag to manage. loading stays a read-only override, and mno-loading-change reports the self-driven state.

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

CSS Variables ​

Vue SFC

Themed through --mono-button-* custom properties (apply them on the element / inline β€” they win over the colorΓ—variant matrix and pierce the shadow boundary). Re-skin globally via the --theme-* tokens.

VariableDefaultControls
--mono-button-primary--theme-primaryPrimary color (default gradient start)
--mono-button-secondary--theme-secondaryDefault gradient end
--mono-button-bgprimary→secondary gradientResolved background
--mono-button-color#fffResolved text color
--mono-button-border-colortransparentResolved border color
--mono-button-shadowprimary glowResolved shadow
--mono-button-hover-bgcurrent bgHover background
--mono-button-hover-shadowprimary glowHover shadow
--mono-button-success / -danger / -warning / -info / -teal / -purple / -darkmatching --theme-*Per-color base
--mono-button-<color>-soft / -lite10% / 24% of the colorTonal fill and border at rest
--mono-button-<color>-soft-hover / -lite-hover20% / 32% of the colorTonal fill and border on hover

Types ​

Importimport { ButtonProps } from 'mono-helper'
PropValueDefaultDescription
size'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'β€”Visual size of the button.
color'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'teal' | 'purple' | 'dark' | 'light'β€”Color theme of the button.
variant'solid' | 'outline' | 'tonal' | 'gradient'β€”Visual style variant (solid, outline, tonal, gradient).
gradient'purple' | 'dark' | 'ocean' | 'mint' | 'sunset'β€”Gradient preset applied when variant is gradient.
shape'square' | 'pill' | 'circle'β€”Corner shape of the button (square, pill, circle).
disabledbooleanβ€”Disables interaction and dims the button.
loadingbooleanβ€”Shows a loading state and blocks clicks.
widthstring | 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.
heightstring | numberβ€”β€”
minWidthstring | numberβ€”β€”
maxWidthstring | numberβ€”β€”
minHeightstring | numberβ€”β€”
maxHeightstring | numberβ€”β€”
hrefstringβ€”Renders the button as an anchor with this URL.
targetstringβ€”Anchor target window when href is set.
type'button' | 'submit' | 'reset'β€”Native button type attribute.
iconPosition'left' | 'right'β€”Placement of the icon relative to the text.
badgestringβ€”Badge text shown on the button.
badgeColor'red' | 'green' | 'orange' | 'cobalt'β€”Color of the badge.
iconOnlybooleanβ€”Renders an icon-only button without text.
fabbooleanβ€”Styles the button as a floating action button.
roundbooleanβ€”Applies fully rounded corners.
circlebooleanβ€”Renders the button as a circle.
glassbooleanβ€”Applies a translucent glass effect.
tooltipstringβ€”Tooltip text shown on hover.
ariaLabelTextstringβ€”Accessible label text for screen readers.
cssClassButtonCssClassβ€”Per-element class overrides.
throttlenull | string | number | ThrottleConfig | booleanβ€”Rate-limit clicks: at most `limit` executions per `interval` ms, the rest queued and replayed rather than dropped. A bare number is the interval. Emits `mno-throttle` per execution.
debouncenull | string | number | DebounceConfig | booleanβ€”Collapse a burst of clicks into one execution, `wait` ms after the last. A bare number is the wait. Emits `mno-debounce` per execution.
handlerButtonHandlerβ€”The work a click performs. Bind as a property (`:handler.prop="save"`) β€” it's what gets throttled/debounced, and its promise drives the spinner.
noAutoLoadingbooleanβ€”Opt out of the self-driven spinner; `loading` stays fully consumer-controlled.