Tangible Design System · @tangible/ui 0.2.29 · Interactive version · Markdown

Borders

Tangible UI includes a small set of border utilities for common use cases:

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:

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.

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:

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

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.