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>Slots (header / default / footer)
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>Footer (footer)
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.
| Type | Default | Required |
|---|---|---|
'single' \| 'double' \| 'rounded' \| 'ascii' \| 'none' | 'single' | ❌ |
color
Semantic border color.
| Type | Default | Required |
|---|---|---|
'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark' | 'primary' | ❌ |
header
Plain-text header content shown above the body. Overridden by the header slot if provided.
| Type | Default | Required |
|---|---|---|
string | — | ❌ |
footer
Plain-text footer content shown below the body. Overridden by the footer slot if provided.
| Type | Default | Required |
|---|---|---|
string | — | ❌ |
design
Design line (or inherit from data-design).
| Type | Default | Required |
|---|---|---|
'tuix' | 'rubik' | — (inherits from data-design) | ❌ |
Slots
| Slot | Description |
|---|---|
header | Optional content in the box header |
default | Main content of the box |
footer | Optional content in the box footer |
CSS Custom Properties
| Token | Default | Description |
|---|---|---|
--font-mono | "JetBrains Mono", ui-monospace, monospace | Monospace font stack for code-like content (key labels, log lines, chips). |
--bg | from theme (--ctp-latte-base / --ctp-mocha-base) | Base background of the surface. |
--bg-alt | from theme (--ctp-latte-mantle / --ctp-mocha-mantle) | Alternate background (the next layer down from the base). |
--bg-panel | from theme (--ctp-latte-surface1 / --ctp-mocha-surface1) | Background of panel-like raised surfaces (cards, accordions). |
--border | from theme (--ctp-latte-surface0 / --ctp-mocha-surface0) | Outline and divider color for surfaces. |
--text-muted | from theme (--ctp-latte-subtext1 / --ctp-mocha-subtext1) | Secondary text for hints, annotations and disabled state. |
--cp-ease | cubic-bezier(.4, 0, .2, 1) | Default easing curve for transitions. |
Ver Theming para la convención completa.