Overview
Use border-width utilities to control how subtle or emphatic a border feels. Bundled widths use CSS variables such asvar(--border-1) so the scale stays tokenized; for context on variables in this stack, see Variables.
Basic Example
Useborder-{size} to set the same width on all four sides.
Individual Sides
Useborder-t-*, border-r-*, border-b-*, and border-l-* when only one edge needs emphasis.
Horizontal and Vertical Sides
Useborder-x-* and border-y-* to apply the same width to a pair of edges.
Best Practices
- Use
border-1andborder-2for most UI surfaces. - Use side-specific widths for tabs, dividers, and timeline markers where only one edge should stand out.
- Use
border-x-*andborder-y-*for split layouts and framed media without over-specifying each side. - Use
border-4and above sparingly for accents, highlights, and decorative frames. - Pair width utilities with explicit style and color helpers such as
.border-solidand.border-gray. - Keep border widths consistent across similar components.

