Borders
Reference for border, radius, and outline enums
Live Demo
Component: borders
Preview + Code

Subtle

Accent

Dashed

Code
ArcaneBox(
  style: const ArcaneStyleData(
    padding: PaddingPreset.lg,
    border: BorderPreset.accentThick,
    borderRadius: Radius.md,
    background: Background.surface,
  ),
  children: const [Text.body('Theme-owned borders')],
)

Borders#

These enums control border styling including presets, radius, width, and style.

BorderPreset#

Complete border configurations combining width, style, and color.

Basic Borders#

ValueDescription
noneNo border
subtle1px subtle border
standard1px standard border
medium1px medium visibility
light1px light border

Semantic Borders#

ValueDescription
accent1px accent color
success1px success color
warning1px warning color
error1px error color
info1px info color

Special Borders#

ValueDescription
focus2px ring color (focus state)
accentThick2px accent border
brand1px brand color
brandThick2px brand color

Dashed Borders#

ValueDescription
dashedSubtle1px dashed subtle
dashedStandard1px dashed standard

Usage#

ArcaneBox(
  style: const ArcaneStyleData(
    border: BorderPreset.subtle,
    borderRadius: Radius.md,
  ),
  children: [...],
)

ArcaneStyleData intentionally has no one-sided border fields. Use a Separator between adjoining regions or a complete perimeter around a surface.

Radius#

Border radius presets. Many values are theme-reactive.

ValueCSS ValueStatic ValueDescription
none00No radius
xs4px4pxExtra small
sm var(--arcane-radius-sm) 6px Small
md var(--arcane-radius-md) 8px Medium
Generic radius values stop at 8px. Circular geometry is private to semantic
components, so generic styles cannot turn a button, badge, tab, statistic, or
card into a pill.

Properties#

Radius.md.css       // "var(--arcane-radius-md)" (theme-reactive)
Radius.md.staticCss // "8px" (static value)

Usage#

// Card radius
Card(
  style: const ArcaneStyleData(
    borderRadius: Radius.md,
  ),
  children: [...],
)

// Avatar circle uses the semantic component API.
ArcaneAvatar.circle(
  imageUrl: 'avatar.jpg',
)

BorderWidth#

Border width values.

ValueCSS OutputDescription
none0No border
hairline1pxHairline border
thin1pxThin border
medium2pxMedium border
thick3pxThick border
heavy4pxHeavy border

Usage#

ArcaneBox(
  style: const ArcaneStyleData(
    borderCustom: '2px solid var(--arcane-accent)',
  ),
  children: [...],
)

BorderStyle#

Border line styles.

ValueCSS OutputDescription
nonenoneNo border
solidsolidSolid line
dasheddashedDashed line
dotteddottedDotted line
double_doubleDouble line
groovegroove3D groove
ridgeridge3D ridge
insetinset3D inset
outsetoutset3D outset

Usage#

ArcaneBox(
  style: const ArcaneStyleData(
    borderCustom: '2px dashed var(--arcane-border)',
  ),
  children: [...],
)

OutlinePreset#

Outline configurations for focus states.

ValueDescription
noneNo outline
focusStandard focus ring
focusAccentAccent color focus
focusErrorError color focus
ringRing outline

Usage#

Button(
  style: const ArcaneStyleData(
    outline: OutlinePreset.focus,
  ),
  label: 'Focused Button',
)

Common Patterns#

Card with Border#

ArcaneBox(
  style: const ArcaneStyleData(
    padding: PaddingPreset.lg,
    background: Background.card,
    border: BorderPreset.subtle,
    borderRadius: Radius.md,
  ),
  children: [...],
)

Input Field#

ArcaneBox(
  style: ArcaneStyleData(
    padding: PaddingPreset.smMd,
    background: Background.input,
    border: isFocused ? BorderPreset.accent : BorderPreset.subtle,
    borderRadius: Radius.md,
    transition: Transition.allFast,
  ),
  children: [...],
)

Divider#

ArcaneBox(
  style: const ArcaneStyleData(
    height: Size.auto,
    border: BorderPreset.subtle,
    margin: MarginPreset.verticalLg,
  ),
  children: [],
)

Avatar with Ring#

ArcaneAvatar.circle(
  imageUrl: 'avatar.jpg',
  borderColor: 'var(--arcane-accent)',
)

Dashed Upload Area#

ArcaneBox(
  style: const ArcaneStyleData(
    padding: PaddingPreset.xl,
    border: BorderPreset.dashedSubtle,
    borderRadius: Radius.md,
    borderWidth: BorderWidth.medium,
  ),
  children: [
    Text('Drop files here'),
  ],
)

Accent Perimeter#

ArcaneBox(
  style: const ArcaneStyleData(
    padding: PaddingPreset.md,
    background: Background.surface,
    borderRadius: Radius.md,
    border: BorderPreset.accentThick,
  ),
  children: [
    Text('Note: This is important information.'),
  ],
)