OutlineBorder
Border and ring wrapper with optional clipping for avatars, thumbnails, and badges.
OutlineBorder
Border and ring wrapper with optional clipping for avatars, thumbnails, and badges. It supports border, ring, ring-offset, and inset ring styles.
Basic Usage
Basic
Demo will load when visible.
Mask Clipping (Example: Hexagon)
Mask Clip
Demo will load when visible.
API
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| as | string | div | Root element tag rendered by the wrapper. |
| variant | 'border' | 'ring' | 'ring-offset' | 'ring-inset' | 'ring-offset' | Visual outline mode. |
| shape | 'circle' | 'rect' | 'squircle' | 'circle' | Shape preset used for the default radius and automatic clipping shape. |
| borderRadius | string | number | - | Explicit radius; numeric values are normalized to pixels. |
| borderWidth | string | number | 1px | Border width, also used as the default ring width. |
| borderColor | string | var(--tx-border-color) | Border color, also used as the default ring color. |
| borderStyle | 'solid' | 'dashed' | 'dotted' | solid | CSS border style used by variant="border". |
| ringWidth | string | number | - | Ring width; falls back to borderWidth when omitted. |
| ringColor | string | - | Ring color; falls back to borderColor when omitted. |
| offset | string | number | 2px | Ring-offset gap used by variant="ring-offset". |
| offsetBg | string | var(--tx-bg-color) | Background color used to paint the ring-offset gap. |
| padding | string | number | 0 | Padding applied inside the outline wrapper. |
| clipMode | 'none' | 'overflow' | 'clipPath' | 'mask' | overflow | Clipping strategy applied to the content layer. |
| clipShape | 'auto' | 'circle' | 'rounded' | 'squircle' | 'hexagon' | auto | Clip shape; auto derives it from shape. |