Layout Components
Col
A container that organizes content vertically within a Row. It provides a simple way to create flexible and responsive column-based layouts.
A vertical flex container. Pairs with Row to build column-based layouts.
Basic Col
Col defaults to column, flex, gap, md, noPadding, noBorder, noRing, outline, and sharp — you don't need to pass any of these. Pass href to render Col as <a> instead of <div> — a focus-visible outline auto-enables when href is set.
<Col> <div className="p-4 bg-gray-100 rounded">Item 1</div> <div className="p-4 bg-gray-100 rounded">Item 2</div> <div className="p-4 bg-gray-100 rounded">Item 3</div></Col>Col Spacing
Use size props (xs, sm, md, lg, xl) to control the gap, or noGap to disable.
xs
sm
md (default)
lg
xl
noGap
<Row itemsStart> <Col xs flex1> <Text semibold>xs</Text> <div className="p-3 bg-gray-100 rounded">Item 1</div> <div className="p-3 bg-gray-100 rounded">Item 2</div> <div className="p-3 bg-gray-100 rounded">Item 3</div> </Col> <Col sm flex1> <Text semibold>sm</Text> <div className="p-3 bg-gray-100 rounded">Item 1</div> <div className="p-3 bg-gray-100 rounded">Item 2</div> <div className="p-3 bg-gray-100 rounded">Item 3</div> </Col> <Col flex1> <Text semibold>md (default)</Text> <div className="p-3 bg-gray-100 rounded">Item 1</div> <div className="p-3 bg-gray-100 rounded">Item 2</div> <div className="p-3 bg-gray-100 rounded">Item 3</div> </Col> <Col lg flex1> <Text semibold>lg</Text> <div className="p-3 bg-gray-100 rounded">Item 1</div> <div className="p-3 bg-gray-100 rounded">Item 2</div> <div className="p-3 bg-gray-100 rounded">Item 3</div> </Col> <Col xl flex1> <Text semibold>xl</Text> <div className="p-3 bg-gray-100 rounded">Item 1</div> <div className="p-3 bg-gray-100 rounded">Item 2</div> <div className="p-3 bg-gray-100 rounded">Item 3</div> </Col> <Col noGap flex1> <Text semibold>noGap</Text> <div className="p-3 bg-gray-100 rounded">Item 1</div> <div className="p-3 bg-gray-100 rounded">Item 2</div> <div className="p-3 bg-gray-100 rounded">Item 3</div> </Col></Row>Items (Cross Axis)
Col has no items default, so children stretch to fill the width. Use itemsStart, itemsCenter, itemsEnd, itemsBaseline, or itemsStretch to override.
default (stretch)
itemsStart
itemsCenter
itemsEnd
<Row itemsStart> <Col flex1 className="border-2 border-dashed border-gray-300 p-2"> <Text semibold>default (stretch)</Text> <div className="p-2 bg-gray-100 rounded">A</div> <div className="p-2 bg-gray-100 rounded">B</div> </Col> <Col itemsStart flex1 className="border-2 border-dashed border-gray-300 p-2"> <Text semibold>itemsStart</Text> <div className="p-2 bg-gray-100 rounded">A</div> <div className="p-2 bg-gray-100 rounded">B</div> </Col> <Col itemsCenter flex1 className="border-2 border-dashed border-gray-300 p-2"> <Text semibold>itemsCenter</Text> <div className="p-2 bg-gray-100 rounded">A</div> <div className="p-2 bg-gray-100 rounded">B</div> </Col> <Col itemsEnd flex1 className="border-2 border-dashed border-gray-300 p-2"> <Text semibold>itemsEnd</Text> <div className="p-2 bg-gray-100 rounded">A</div> <div className="p-2 bg-gray-100 rounded">B</div> </Col></Row>Justify (Main Axis)
Control vertical distribution with justifyStart, justifyEnd, justifyCenter, justifyBetween, justifyAround, or justifyEvenly. The Col needs a fixed height for these to have any effect.
justifyStart
justifyCenter
justifyEnd
justifyBetween
justifyAround
justifyEvenly
<Row itemsStart> <Col justifyStart flex1 className="h-48 border-2 border-dashed border-gray-300 p-2"> <Text semibold>justifyStart</Text> <div className="p-2 bg-gray-100 rounded">A</div> <div className="p-2 bg-gray-100 rounded">B</div> </Col> <Col justifyCenter flex1 className="h-48 border-2 border-dashed border-gray-300 p-2"> <Text semibold>justifyCenter</Text> <div className="p-2 bg-gray-100 rounded">A</div> <div className="p-2 bg-gray-100 rounded">B</div> </Col> <Col justifyEnd flex1 className="h-48 border-2 border-dashed border-gray-300 p-2"> <Text semibold>justifyEnd</Text> <div className="p-2 bg-gray-100 rounded">A</div> <div className="p-2 bg-gray-100 rounded">B</div> </Col> <Col justifyBetween flex1 className="h-48 border-2 border-dashed border-gray-300 p-2"> <Text semibold>justifyBetween</Text> <div className="p-2 bg-gray-100 rounded">A</div> <div className="p-2 bg-gray-100 rounded">B</div> </Col> <Col justifyAround flex1 className="h-48 border-2 border-dashed border-gray-300 p-2"> <Text semibold>justifyAround</Text> <div className="p-2 bg-gray-100 rounded">A</div> <div className="p-2 bg-gray-100 rounded">B</div> </Col> <Col justifyEvenly flex1 className="h-48 border-2 border-dashed border-gray-300 p-2"> <Text semibold>justifyEvenly</Text> <div className="p-2 bg-gray-100 rounded">A</div> <div className="p-2 bg-gray-100 rounded">B</div> </Col></Row>Reverse Order
Use columnReverse to reverse the visual order of children.
<Col columnReverse className="border-2 border-dashed border-gray-300 p-2"> <div className="p-3 bg-gray-100 rounded">First in DOM</div> <div className="p-3 bg-gray-100 rounded">Second</div> <div className="p-3 bg-gray-100 rounded">Last in DOM</div></Col>Col Variants
Use filled with an appearance prop for a filled background. Col defaults to sharp — pair with rounded or pill for curved corners, and add padding so the background has breathing room.
<Row itemsStart> <Col filled primary padding rounded flex1> <div className="p-4 bg-white/80 rounded">Filled Primary</div> <div className="p-4 bg-white/80 rounded">Item 2</div> </Col> <Col border success padding rounded flex1> <div className="p-4 rounded">Outline Success</div> <div className="p-4 rounded">Item 2</div> </Col></Row>Text Alignment
Use textLeft, textCenter, textRight, or textJustify to control text alignment within the column.
Left Aligned
Content aligned to the left.
Center Aligned
Content centered within the column.
Right Aligned
Content aligned to the right.
<Row itemsStart> <Col textLeft flex1 className="border-2 border-dashed border-gray-300 p-4"> <Text semibold>Left Aligned</Text> <Text>Content aligned to the left.</Text> </Col> <Col textCenter flex1 className="border-2 border-dashed border-gray-300 p-4"> <Text semibold>Center Aligned</Text> <Text>Content centered within the column.</Text> </Col> <Col textRight flex1 className="border-2 border-dashed border-gray-300 p-4"> <Text semibold>Right Aligned</Text> <Text>Content aligned to the right.</Text> </Col></Row>Nested in Row
Col is commonly used inside Row to create multi-column layouts. Use flex1 so each column shares the available width equally.
Column 1
First column content.
Column 2
Second column content.
Column 3
Third column content.
<Row itemsStart> <Col flex1> <Card> <Title>Column 1</Title> <Text sm secondary>First column content.</Text> </Card> </Col> <Col flex1> <Card> <Title>Column 2</Title> <Text sm secondary>Second column content.</Text> </Card> </Col> <Col flex1> <Card> <Title>Column 3</Title> <Text sm secondary>Third column content.</Text> </Card> </Col></Row>Inside a Card
Col composes naturally inside a Card to lay out a vertical cluster — labelled fields, key/value pairs, or a list of actions.
Account
Plan
ProSeats
12 / 25
Renews
Jan 14, 2026
<Card> <Title>Account</Title> <Col> <Row justifyBetween> <Text secondary>Plan</Text> <Badge success>Pro</Badge> </Row> <Row justifyBetween> <Text secondary>Seats</Text> <Text semibold>12 / 25</Text> </Row> <Row justifyBetween> <Text secondary>Renews</Text> <Text semibold>Jan 14, 2026</Text> </Row> </Col> <Row justifyEnd> <Button secondary>Manage</Button> <Button filled>Upgrade</Button> </Row></Card>As a Navigation Column
Col is a natural container for a vertical stack of NavLinks in a sidebar.
<Col className="w-56 border-2 border-dashed border-gray-300 p-3"> <NavLink href="#" active>Dashboard</NavLink> <NavLink href="#">Projects</NavLink> <NavLink href="#">Team</NavLink> <NavLink href="#">Billing</NavLink> <NavLink href="#">Settings</NavLink></Col>As Link
Add href to render the Col as an <a> tag — useful for clickable feature tiles. A keyboard focus-visible outline auto-renders so the link is reachable via Tab; opt out with noFocusVisible.
<Row itemsStart> <Col href="#docs" flex1 padding border rounded> <BookOpen size={20} /> <Title>Documentation</Title> <Text secondary>Browse guides and API reference.</Text> </Col> <Col href="#examples" flex1 padding border rounded> <Codepen size={20} /> <Title>Examples</Title> <Text secondary>Copy-ready component patterns.</Text> </Col> <Col href="https://github.com" target="_blank" rel="noopener noreferrer" flex1 padding border rounded> <GitHub size={20} /> <Title>Source</Title> <Text secondary>View the project on GitHub.</Text> </Col></Row>Next.js Link Integration
Use the tag prop to render the Col as a Next.js Link for client-side navigation.
import Link from 'next/link';import { Col, Title, Text } from '@vaneui/ui';
<Col href="/docs" tag={Link} padding border rounded> <Title>Documentation</Title> <Text secondary>Browse guides and API reference.</Text></Col>Col Props
| Prop | Category | Default | Description |
|---|---|---|---|
accent | Appearance | Accent color appearance (rose) | |
brand | Appearance | Brand color appearance (blue) | |
danger | Appearance | Danger color appearance (red) | |
info | Appearance | Info color appearance (cyan) | |
inherit | Appearance | Inherit appearance from parent — suppresses own data-appearance/data-variant, uses parent's CSS variables | |
link | Appearance | Link color appearance (blue, for hyperlinks) | |
primary | Appearance | Primary color appearance (gray) | |
secondary | Appearance | Secondary color appearance (gray) | |
success | Appearance | Success color appearance (green) | |
tertiary | Appearance | Tertiary color appearance | |
warning | Appearance | Warning color appearance (amber) | |
desktopCol | Breakpoint | Switch to column layout on desktop and below (max-desktop: 80rem) | |
mobileCol | Breakpoint | Switch to column layout on mobile and below (max-mobile: 48rem) | |
tabletCol | Breakpoint | Switch to column layout on tablet and below (max-tablet: 64rem) | |
flex1 | Flex | Take up remaining space (= `flex-1`, i.e. `flex: 1 1 0%`) | |
flexAuto | Flex | Grow but respect intrinsic size (= `flex-auto`, i.e. `flex: 1 1 auto`) | |
flexNone | Flex | Don't grow and don't shrink (= `flex-none`, i.e. `flex: none`) | |
noPadding | Padding | ✓ | Disable internal padding |
padding | Padding | Enable internal padding | |
paddingX | Padding | Enable only horizontal padding | |
paddingY | Padding | Enable only vertical padding | |
pill | Shape | Fully rounded corners (circular) | |
rounded | Shape | Medium rounded corners (default) | |
sharp | Shape | ✓ | No rounded corners (square) |
noShrink | Shrink | Prevent the flex item from shrinking below its content size (= `shrink-0`) | |
lg | Size | Large size | |
md | Size | ✓ | Medium size (default) |
sm | Size | Small size | |
xl | Size | Extra large size | |
xs | Size | Extra small size | |
textCenter | Text Align | Align text to center | |
textJustify | Text Align | Justify text | |
textLeft | Text Align | Align text to left | |
textRight | Text Align | Align text to right | |
filled | Variant | Filled variant - solid background with contrasting text color | |
ghost | Variant | Ghost variant - transparent background, no border, appearance-colored text, tinted hover background | |
outline | Variant | ✓ | Outline variant - transparent background with border and colored text (default) |
Layout & utility props (gap, padding, hide, items, justify, ...) — documented on Common Props
| Prop | Category | Default | Description |
|---|---|---|---|
border | Border | Enable border on all sides | |
borderB | Border | Enable border on bottom | |
borderL | Border | Enable border on left | |
borderR | Border | Enable border on right | |
borderT | Border | Enable border on top | |
borderX | Border | Enable border on left and right | |
borderY | Border | Enable border on top and bottom | |
noBorder | Border | ✓ | Disable all borders |
block | Display | Block display - takes full width, new line | |
contents | Display | Contents display - element's box is removed, children display as if parent didn't exist | |
flex | Display | ✓ | Flex display - flexbox container |
grid | Display | Grid display - CSS grid container | |
hidden | Display | Hidden display - element is not visible | |
inline | Display | Inline display - flows with text | |
inlineBlock | Display | Inline-block display - inline but with block properties | |
inlineFlex | Display | Inline-flex display - inline flexbox container | |
inlineGrid | Display | Inline-grid display - inline grid container | |
table | Display | Table display - behaves like table element | |
tableCell | Display | Table-cell display - behaves like td element | |
column | Flex Direction | ✓ | Flex direction column (vertical) |
columnReverse | Flex Direction | Flex direction column-reverse | |
row | Flex Direction | Flex direction row (horizontal) | |
rowReverse | Flex Direction | Flex direction row-reverse | |
focusVisible | Focus Visible | Enable focus-visible outline | |
noFocusVisible | Focus Visible | Disable focus-visible outline | |
gap | Gap | ✓ | Enable gap spacing between children |
noGap | Gap | Disable gap spacing | |
hAuto | Height | Set height to auto | |
hFit | Height | Set height to fit-content | |
hFull | Height | Set height to 100% | |
hScreen | Height | Set height to 100vh (viewport height), removes max-height constraint | |
desktopHide | Hide | Hide element on desktop devices and below (max-desktop: 80rem) | |
mobileHide | Hide | Hide element on mobile devices and below (max-mobile: 48rem) | |
tabletHide | Hide | Hide element on tablet devices and below (max-tablet: 64rem) | |
itemsBaseline | Items | Align items to baseline | |
itemsCenter | Items | Align items to center | |
itemsEnd | Items | Align items to end (bottom/right) | |
itemsStart | Items | Align items to start (top/left) | |
itemsStretch | Items | Stretch items to fill container | |
justifyAround | Justify | Distribute items with space around them | |
justifyBaseline | Justify | Align items along their baseline on main axis | |
justifyBetween | Justify | Distribute items with space between them | |
justifyCenter | Justify | Center items along the main axis | |
justifyEnd | Justify | Pack items toward the end of the main axis | |
justifyEvenly | Justify | Distribute items with equal space around them | |
justifyStart | Justify | Pack items toward the start of the main axis | |
justifyStretch | Justify | Stretch items to fill the main axis | |
overflowAuto | Overflow | Auto overflow - show scrollbars if needed | |
overflowClip | Overflow | Clip overflow - hard clip without scrollbars | |
overflowHidden | Overflow | Hidden overflow - clip content without scrollbars | |
overflowScroll | Overflow | Scroll overflow - always show scrollbars | |
overflowVisible | Overflow | Visible overflow - content extends beyond bounds | |
overflowXAuto | Overflow | Auto overflow on X-axis only | |
overflowXClip | Overflow | Clip overflow on X-axis only | |
overflowXHidden | Overflow | Hidden overflow on X-axis only | |
overflowXScroll | Overflow | Scroll overflow on X-axis only | |
overflowXVisible | Overflow | Visible overflow on X-axis only | |
overflowYAuto | Overflow | Auto overflow on Y-axis only | |
overflowYClip | Overflow | Clip overflow on Y-axis only | |
overflowYHidden | Overflow | Hidden overflow on Y-axis only | |
overflowYScroll | Overflow | Scroll overflow on Y-axis only | |
overflowYVisible | Overflow | Visible overflow on Y-axis only | |
absolute | Position | Absolute positioning | |
fixed | Position | Fixed positioning | |
relative | Position | Relative positioning | |
static | Position | Static positioning | |
sticky | Position | Sticky positioning | |
responsive | Responsive | Enable responsive sizing - uses breakpoint-specific classes for font size, padding, and gap | |
reverse | Reverse | Reverse the order of children | |
noRing | Ring | ✓ | Disable focus ring |
ring | Ring | Enable focus ring | |
noShadow | Shadow | Disable drop shadow | |
shadow | Shadow | Enable drop shadow | |
transparent | Transparent | Disable background color - makes component background transparent | |
wAuto | Width | Set width to auto | |
wFit | Width | Set width to fit-content | |
wFull | Width | Set width to 100% | |
wScreen | Width | Set width to 100vw (viewport width), removes max-width constraint | |
flexNoWrap | Wrap | Force flex items to stay on single line (may overflow) | |
flexWrap | Wrap | Allow flex items to wrap to new lines when container is too narrow | |
flexWrapReverse | Wrap | Wrap flex items in reverse order (last items wrap first) |