Skip to content

Card โ€‹

A surface for grouping related content with optional header and footer actions. Toggle Vue / CSS to switch the live demo and source together.

Basic โ€‹

Simple card with optional title and subtitle.

Vue SFC

Variants โ€‹

Elevated, outlined, flat and tonal looks.

Vue SFC

Colors โ€‹

Primary, success, danger, warning, info accents.

Vue SFC

States โ€‹

Bordered, hoverable, clickable and disabled.

Vue SFC

Actions โ€‹

Footer actions slot with multiple buttons.

Vue SFC

Event: click โ€‹

Listen for mno-click on a clickable card.

Vue SFC

Event: toggle โ€‹

Use the click event to switch the card variant.

Vue SFC

Event log โ€‹

Live log of mno-click events, distinguishing mouse vs keyboard.

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 ("320px", "80%") or a number (px). Use width="100%" for a full-width card (replaces the old fullWidth).

Vue SFC

Types โ€‹

Importimport { CardProps } from 'mono-helper'
PropValueDefaultDescription
size'md' | 'compact' | 'comfortable''md'Visual size of the card.
variant'tonal' | 'gradient' | 'elevated' | 'outlined' | 'flat' | 'glass''elevated'Visual style variant of the card.
color'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'teal' | 'purple' | 'dark' | 'light' | 'neutral''neutral'Color theme of the card.
shape'square' | 'soft' | 'round''soft'Corner shape of the card.
mediaPosition'top' | 'bottom''top'Position of the media slot (top or bottom).
headingstringโ€”Title text shown in the card header.
subheadingstringโ€”Subtitle text shown under the heading.
borderedbooleanfalseAdds a border around the card.
hoverablebooleanfalseAdds a hover elevation effect.
clickablebooleanfalseMakes the card interactive and clickable.
selectedbooleanfalseApplies the selected highlight state.
disabledbooleanfalseDisables interaction and dims the card.
loadingbooleanfalseShows a loading overlay on the card.
widthstring | numberโ€”Explicit sizing. Each accepts a CSS length string (`"320px"`, `"80%"`) or a number (interpreted as px). Use `width="100%"` for a full-width card.
heightstring | numberโ€”โ€”
minWidthstring | numberโ€”โ€”
maxWidthstring | numberโ€”โ€”
minHeightstring | numberโ€”โ€”
maxHeightstring | numberโ€”โ€”
headerDividerbooleantrueShows a divider below the header.
footerDividerbooleantrueShows a divider above the footer.
hrefstringโ€”Renders the card as an anchor with this URL.
targetstringโ€”Anchor target window when href is set.
ariaLabelTextstringโ€”Accessible label text for screen readers.
ariaLabelstringโ€”โ€”
cssClassCardCssClass{}Per-element class overrides.