Skip to content

ScrollView ​

Scroll container with a custom terminal-style bar.

ScrollView

Design lines ​

line1
line2
line3
line4
line5
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    <ScrollView max-height="80px" design="tuix">line1<br />line2<br />line3<br />line4<br />line5</ScrollView>8  </TabPanel>9  <TabPanel value="rubik">10    <ScrollView max-height="80px" design="rubik">line1<br />line2<br />line3<br />line4<br />line5</ScrollView>11  </TabPanel>12</Tabs>

Demo ​

Basic (items) ​

A long list of items inside a fixed-height scrollable viewport.

Line 1: scrollable content
Line 2: scrollable content
Line 3: scrollable content
Line 4: scrollable content
Line 5: scrollable content
Line 6: scrollable content
Line 7: scrollable content
Line 8: scrollable content
Line 9: scrollable content
Line 10: scrollable content
Line 11: scrollable content
Line 12: scrollable content
Line 13: scrollable content
Line 14: scrollable content
Line 15: scrollable content
Line 16: scrollable content
Line 17: scrollable content
Line 18: scrollable content
Line 19: scrollable content
Line 20: scrollable content
vue
1<ScrollView maxHeight="120px">2  <div v-for="i in 20" :key="i">Line {{ i }}: scrollable content</div>3</ScrollView>

Max height (maxHeight) ​

A long block that scrolls past maxHeight.

Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
vue
1<ScrollView maxHeight="80px">2<ScrollView maxHeight="160px">

Show bar (showBar) ​

Toggles the scroll bar with showBar on and off.

Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
Line 11
Line 12
Line 13
Line 14
Line 15
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
Line 11
Line 12
Line 13
Line 14
Line 15
vue
1<ScrollView maxHeight="100px" showBar>2<ScrollView maxHeight="100px" :showBar="false">

Color (color) ​

Three scroll views with different color values.

Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
vue
1<ScrollView maxHeight="100px" color="primary">2<ScrollView maxHeight="100px" color="success">3<ScrollView maxHeight="100px" color="danger">

Props ​

maxHeight ​

Maximum height of the container before scroll activates.

TypeDefaultRequired
string'300px'❌

showBar ​

Shows or hides the custom scroll bar.

TypeDefaultRequired
booleantrue❌

color ​

Color of the bar thumb on hover.

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

design ​

Design line (or inherit from data-design).

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

Slots ​

SlotDescription
defaultContent to scroll

CSS Custom Properties ​

TokenDefaultDescription
--font-mono"JetBrains Mono", ui-monospace, monospaceMonospace font stack for code-like content (key labels, log lines, chips).
--accentfrom theme (--ctp-latte-mauve / --ctp-mocha-mauve)Accent color, mapped from the active semantic color.
--bgfrom theme (--ctp-latte-base / --ctp-mocha-base)Base background of the surface.
--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.
--textfrom theme (--ctp-latte-text / --ctp-mocha-text)Primary text color used inside the component.
--text-mutedfrom theme (--ctp-latte-subtext1 / --ctp-mocha-subtext1)Secondary text for hints, annotations and disabled state.
--color-primaryfrom theme (--ctp-latte-mauve / --ctp-mocha-mauve)Primary semantic color (mauve in Catppuccin).
--color-secondaryfrom theme (--ctp-latte-lavender / --ctp-mocha-lavender)Secondary semantic color (lavender in Catppuccin).
--color-tertiaryfrom theme (--ctp-latte-blue / --ctp-mocha-blue)Tertiary semantic color (blue in Catppuccin).
--color-successfrom theme (--ctp-latte-green / --ctp-mocha-green)Success semantic color (green in Catppuccin).
--color-warningfrom theme (--ctp-latte-yellow / --ctp-mocha-yellow)Warning semantic color (yellow in Catppuccin).
--color-dangerfrom theme (--ctp-latte-red / --ctp-mocha-red)Danger semantic color (red in Catppuccin).
--color-lightfrom theme (--ctp-latte-surface1 / --ctp-mocha-rosewater)Light semantic color (lighter contrast tone).
--color-mediumfrom theme (--ctp-latte-overlay0 / --ctp-mocha-overlay2)Medium semantic color (mid-tone).
--color-darkfrom theme (--ctp-latte-text / --ctp-mocha-subtext1)Dark semantic color (high contrast text).

Ver Theming para la convención completa.