Layout Components
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.
BasicCol.tsx
<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>
Cols come in different sizes.
Extra Small Col
Large Col
ColSizes.tsx
<Row>
<Col lg>
<Text semibold>Extra Small Col</Text>
<Col xs>
<div className="p-2 bg-gray-100 rounded text-sm">Item 1</div>
<div className="p-2 bg-gray-100 rounded text-sm">Item 2</div>
<div className="p-2 bg-gray-100 rounded text-sm">Item 3</div>
</Col>
</Col>
<Col lg>
<Text semibold>Large Col</Text>
<Col lg>
<div className="p-6 bg-gray-100 rounded">Item 1</div>
<div className="p-6 bg-gray-100 rounded">Item 2</div>
<div className="p-6 bg-gray-100 rounded">Item 3</div>
</Col>
</Col>
</Row>
Control spacing between col items.
No Gap
With Gap
ColwithGap.tsx
<Row>
<Col lg>
<Text semibold>No Gap</Text>
<Col noGap>
<div className="p-4 bg-gray-100 border">Item 1</div>
<div className="p-4 bg-gray-100 border">Item 2</div>
<div className="p-4 bg-gray-100 border">Item 3</div>
</Col>
</Col>
<Col lg>
<Text semibold>With Gap</Text>
<Col gap>
<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>
</Row>
Control how items wrap within the col.
Flex Wrap
No Wrap
ColWrapOptions.tsx
<Row>
<Col lg>
<Text semibold>Flex Wrap</Text>
<Col className="max-h-40" flexWrap>
<div className="p-4 bg-gray-100 rounded">Tall Item 1</div>
<div className="p-4 bg-gray-100 rounded">Tall Item 2</div>
<div className="p-4 bg-gray-100 rounded">Tall Item 3</div>
<div className="p-4 bg-gray-100 rounded">Tall Item 4</div>
</Col>
</Col>
<Col lg>
<Text semibold>No Wrap</Text>
<Col className="max-h-40" flexNoWrap>
<div className="p-4 bg-gray-100 rounded">Tall Item 1</div>
<div className="p-4 bg-gray-100 rounded">Tall Item 2</div>
<div className="p-4 bg-gray-100 rounded">Tall Item 3</div>
</Col>
</Col>
</Row>
Control how items are distributed along the main axis.
Justify Start
Justify Center
Justify Between
ColJustification.tsx
<Row>
<Col lg>
<Text semibold>Justify Start</Text>
<Col className="h-40 border-2 border-dashed border-gray-300" justifyStart>
<div className="p-4 bg-gray-100 rounded">Item 1</div>
<div className="p-4 bg-gray-100 rounded">Item 2</div>
</Col>
</Col>
<Col lg>
<Text semibold>Justify Center</Text>
<Col className="h-40 border-2 border-dashed border-gray-300" justifyCenter>
<div className="p-4 bg-gray-100 rounded">Item 1</div>
<div className="p-4 bg-gray-100 rounded">Item 2</div>
</Col>
</Col>
<Col lg>
<Text semibold>Justify Between</Text>
<Col className="h-40 border-2 border-dashed border-gray-300" justifyBetween>
<div className="p-4 bg-gray-100 rounded">Item 1</div>
<div className="p-4 bg-gray-100 rounded">Item 2</div>
</Col>
</Col>
</Row>
Cols can have different background appearances.
ColAppearances.tsx
<Row>
<Col primary>
<div className="p-4 bg-white rounded">Item 1</div>
<div className="p-4 bg-white rounded">Item 2</div>
<div className="p-4 bg-white rounded">Item 3</div>
</Col>
<Col secondary>
<div className="p-4 bg-white rounded">Item 1</div>
<div className="p-4 bg-white rounded">Item 2</div>
<div className="p-4 bg-white rounded">Item 3</div>
</Col>
</Row>
Reverse the order of items in the col.
Normal Order
Reverse Order
ColReverse.tsx
<Row>
<Col lg>
<Text semibold>Normal Order</Text>
<Col>
<div className="p-4 bg-gray-100 rounded">First</div>
<div className="p-4 bg-gray-200 rounded">Second</div>
<div className="p-4 bg-gray-300 rounded">Third</div>
</Col>
</Col>
<Col lg>
<Text semibold>Reverse Order</Text>
<Col reverse>
<div className="p-4 bg-gray-100 rounded">First</div>
<div className="p-4 bg-gray-200 rounded">Second</div>
<div className="p-4 bg-gray-300 rounded">Third</div>
</Col>
</Col>
</Row>