Skip to content

Box ​

Decorative wrapper with terminal-style border variants.

Box

Design lines ​

Header
Box content
vue
1<Tabs defaultValue="tuix">2  <TabsList>3    <Tab value="tuix">TUIX</Tab>4    <Tab value="rubik">Rubik</Tab>5  </TabsList>6  <TabPanel value="tuix">7    <Box design="tuix"><template #header>Header</template>Box content<template #footer>Footer</template></Box>8  </TabPanel>9  <TabPanel value="rubik">10    <Box design="rubik"><template #header>Header</template>Box content<template #footer>Footer</template></Box>11  </TabPanel>12</Tabs>

Demo ​

Border (borderStyle) ​

All five borderStyle variants, from single to none.

Single
Double
Rounded
Ascii
None
vue
1<Box borderStyle="single">Single</Box>2<Box borderStyle="double">Double</Box>3<Box borderStyle="rounded">Rounded</Box>4<Box borderStyle="ascii">Ascii</Box>5<Box borderStyle="none">None</Box>

Color (color) ​

Semantic color values applied to the box border.

Primary
Success
Danger
vue
1<Box borderStyle="single" color="primary">Primary</Box>2<Box borderStyle="single" color="success">Success</Box>3<Box borderStyle="single" color="danger">Danger</Box>

The three named slots fill the box header, body and footer.

Header
Box content.
vue
1<Box>2  <template #header>Header</template>3  Content.4  <template #footer>Footer</template>5</Box>

Header (header) ​

Plain-text header content via the header prop. The slot wins if both are provided.

Note:
Content with a header label.
vue
1<Box header="Note:">Content with a header label.</Box>

Plain-text footer content via the footer prop. The slot wins if both are provided.

Content with a footer label.
vue
1<Box footer="End of section">Content with a footer label.</Box>

Props ​

borderStyle ​

Box border variant.

TypeDefaultRequired
'single' \| 'double' \| 'rounded' \| 'ascii' \| 'none''single'❌

color ​

Semantic border color.

TypeDefaultRequired
'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark''primary'❌

Plain-text header content shown above the body. Overridden by the header slot if provided.

TypeDefaultRequired
string—❌

Plain-text footer content shown below the body. Overridden by the footer slot if provided.

TypeDefaultRequired
string—❌

design ​

Design line (or inherit from data-design).

TypeDefaultRequired
'tuix' | 'rubik'— (inherits from data-design)❌

Slots ​

SlotDescription
headerOptional content in the box header
defaultMain content of the box
footerOptional content in the box footer

CSS Custom Properties ​

TokenDefaultDescription
--font-mono"JetBrains Mono", ui-monospace, monospaceMonospace font stack for code-like content (key labels, log lines, chips).
--bgfrom theme (--ctp-latte-base / --ctp-mocha-base)Base background of the surface.
--bg-altfrom theme (--ctp-latte-mantle / --ctp-mocha-mantle)Alternate background (the next layer down from the base).
--bg-panelfrom theme (--ctp-latte-surface1 / --ctp-mocha-surface1)Background of panel-like raised surfaces (cards, accordions).
--borderfrom theme (--ctp-latte-surface0 / --ctp-mocha-surface0)Outline and divider color for surfaces.
--text-mutedfrom theme (--ctp-latte-subtext1 / --ctp-mocha-subtext1)Secondary text for hints, annotations and disabled state.
--cp-easecubic-bezier(.4, 0, .2, 1)Default easing curve for transitions.

Ver Theming para la convención completa.