Skip to content

Tabs โ€‹

A horizontal tab strip with sizes, color variants, three visual styles (underline / pill / ghost), optional count badges, optional SVG icons via slot, and per-item disabled state. Content panes live outside the strip โ€” drive them off the bound model-value. Toggle Vue / CSS to switch the live demo and source together.

Basic โ€‹

Three tabs with text panes that swap on click.

Vue SFC

Sizes โ€‹

Small, medium and large.

Vue SFC

Colors โ€‹

All built-in color variants.

Vue SFC

Variants โ€‹

underline, pill and ghost.

Vue SFC

Badges โ€‹

Tabs with trailing count badges.

Vue SFC

Icons โ€‹

Leading SVG icons via the icon-{id} slot.

Vue SFC

Disabled โ€‹

Whole-strip disabled, plus per-item disabled.

Vue SFC

Event log โ€‹

Live log of mno-click events.

Vue SFC

Customized โ€‹

Override per-element styling with cssClass (Vue) or utility classes (CSS).

Vue SFC

CSS Variables โ€‹

Vue SFC

Every tab strip is themed through --mono-tabs-* custom properties. Setting one on the element, on any wrapper/ancestor, or inline all work โ€” custom properties inherit, and they pierce the shadow-DOM boundary, so the same overrides apply to <mono-tabs> and the shadow build. The size and color props set presets, but an explicit --mono-tabs-* override always wins. To re-skin globally, set the underlying --theme-* tokens.

VariableDefaultControls
--mono-tabs-accent--theme-primaryActive tab / indicator color (set by color)
--mono-tabs-text--theme-textBase text color
--mono-tabs-mutedtext 62%Inactive tab text color
--mono-tabs-surface--theme-surfaceActive pill background
--mono-tabs-background--theme-backgroundPill-strip background
--mono-tabs-border--theme-borderUnderline / pill border color
--mono-tabs-pad-x0.75remTab horizontal padding (set by size)
--mono-tabs-pad-y0.4remTab vertical padding (set by size)
--mono-tabs-font--theme-title-font-smTab label font size (set by size)
--mono-tabs-gap0.35remGap between icon / label / badge (set by size)

Types โ€‹

Importimport { TabsProps } from 'mono-helper'
PropValueDefaultDescription
itemsTabItem[]โ€”List of tabs to render.
modelValuestringโ€”Two-way bound id of the active tab.
valuestringโ€”Id of the active tab (kept in sync with modelValue).
size'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'โ€”Size of the tabs.
color'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info'โ€”Color theme of the tabs.
variant'pill' | 'underline' | 'ghost'โ€”Visual style of the tabs.
disabledbooleanโ€”Disables interaction with all tabs.
cssClassTabsCssClassโ€”Per-part class overrides for styling internal elements.