Borders
Tangible UI includes a small set of border utilities for common use cases:
- Consistent rounded corners
- Simple 1px borders on all or specific sides
- Semantic border colors that align with the theme tokens
All utilities are scoped to .tui-interface so they only affect Tangible interfaces.
Border radius utilities
Border radius helpers map directly to the design tokens (for example --tui-radius-sm). Prefer consuming the tokens directly (border-radius: var(--tui-radius-sm)) when you control the CSS — the helpers exist for markup-only contexts. See the Primitive Token Index.
Available helpers:
tui-rounded-none– square cornerstui-rounded-xs– extra small radiustui-rounded-sm– small radiustui-rounded-md– medium radiustui-rounded-lg– large radiustui-rounded-xl– extra large radiustui-rounded-full– fully rounded, typically used for pills and circles
Example:
<div class="tui-interface">
<div class="tui-rounded-sm tui-border tui-border-contrast-low">
Small radius
</div>
<button class="tui-rounded-full tui-border tui-border-primary">
Pill button
</button>
</div>
Border utilities
Border utilities default to var(--tui-color-border) and use a shared width token. Naming follows logical axes (block / inline) for RTL safety, matching the margin and padding helpers.
tui-border– apply a 1px border on all sidestui-border-0– remove bordertui-border-block– top and bottomtui-border-block-start– top (LTR) / top (RTL)tui-border-block-end– bottom (LTR) / bottom (RTL)tui-border-inline– left and righttui-border-inline-start– left (LTR) / right (RTL)tui-border-inline-end– right (LTR) / left (RTL)
All borders use --tui-border-width (default 1px) under the hood. Override this token to change border thickness globally.
For emphasised edges — selected options, verdict panels, active cards — use the bold step, --tui-border-width-bold (default 2px), instead of hardcoding a width. The pair keeps emphasis consistent across surfaces and lets hosts retune both weights together.
Example:
<div class="tui-interface">
<div class="tui-border-block-end tui-border-contrast-low">
Section header with bottom rule
</div>
<div class="tui-border-inline-start tui-border-primary">
Highlighted side
</div>
</div>
Border color utilities
Border color helpers are semantic and theme-aware. Each class prefers a --tui-theme-*-border token and falls back to --tui-theme-*-base.
Available helpers:
tui-border-primarytui-border-secondarytui-border-infotui-border-warningtui-border-dangertui-border-successtui-border-contrast-hightui-border-contrast-low
Example:
<div class="tui-interface tui-theme-default">
<div class="tui-border tui-rounded-sm tui-border-info">
Informational callout
</div>
<div class="tui-border tui-rounded-sm tui-border-danger">
Destructive or error state
</div>
<div class="tui-border tui-rounded-sm tui-border-contrast-low">
Subtle divider or container
</div>
</div>
When to use
- Use
tui-rounded-*to match plugin UI designs without redefining border radii per component. - Use
tui-borderand the axis-specific helpers for lightweight separators and container outlines. - Use semantic
tui-border-*color utilities for notices, focus rings, selected states, and validation feedback.
These utilities are intentionally minimal. If you find yourself repeatedly hand-writing custom border rules for plugin frontends, consider whether a new helper belongs here.