ArcaneJaspr Codex
Documentation
Borders
Reference for border, radius, and outline enums
Live Demo
Border presets
standard
subtle
accent
Border radius
xs
sm
md
lg
xl
full

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

Directional Borders#

ValueDescription
topSubtleTop border only
bottomSubtleBottom border only

Usage#

ArcaneDiv(
  styles: const ArcaneStyleData(
    border: BorderPreset.subtle,
    borderRadius: Radius.lg,
  ),
  children: [...],
)

// Bottom border separator
ArcaneDiv(
  styles: const ArcaneStyleData(
    padding: PaddingPreset.md,
    borderBottom: BorderPreset.subtle,
  ),
  children: [...],
)

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
lg var(--arcane-radius-lg) 12px Large
xl var(--arcane-radius-xl) 16px Extra large
xxl var(--arcane-radius-2xl) 24px Double extra large
full 9999px 9999px Pill shape
circle 50% 50% Perfect circle

Properties#

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

Usage#

// Card radius
ArcaneCard(
  styles: const ArcaneStyleData(
    borderRadius: Radius.lg,
  ),
  children: [...],
)

// Pill button
ArcaneButton(
  styles: const ArcaneStyleData(
    borderRadius: Radius.full,
  ),
  label: 'Pill Button',
)

// Avatar circle
ArcaneAvatar(
  styles: const ArcaneStyleData(
    borderRadius: Radius.circle,
  ),
  imageUrl: 'avatar.jpg',
)

BorderWidth#

Border width values.

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

Usage#

ArcaneDiv(
  styles: const ArcaneStyleData(
    raw: {
      'border-width': BorderWidth.medium.css,
      'border-style': 'solid',
      'border-color': '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#

ArcaneDiv(
  styles: const ArcaneStyleData(
    raw: {
      'border': '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#

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

Common Patterns#

Card with Border#

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

Input Field#

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

Divider#

ArcaneDiv(
  styles: const ArcaneStyleData(
    height: Size.auto,
    borderBottom: BorderPreset.subtle,
    margin: MarginPreset.verticalLg,
  ),
  children: [],
)

Avatar with Ring#

ArcaneDiv(
  styles: const ArcaneStyleData(
    borderRadius: Radius.circle,
    raw: {
      'border': '3px solid var(--arcane-accent)',
      'padding': '2px',
    },
  ),
  children: [
    ArcaneAvatar(imageUrl: 'avatar.jpg'),
  ],
)

Dashed Upload Area#

ArcaneDiv(
  styles: const ArcaneStyleData(
    padding: PaddingPreset.xl,
    border: BorderPreset.dashedSubtle,
    borderRadius: Radius.lg,
    raw: {
      'border-width': '2px',
    },
  ),
  children: [
    ArcaneText('Drop files here'),
  ],
)

Accent Left Border#

ArcaneDiv(
  styles: const ArcaneStyleData(
    padding: PaddingPreset.md,
    background: Background.surface,
    borderRadius: Radius.md,
    raw: {
      'border-left': '4px solid var(--arcane-accent)',
    },
  ),
  children: [
    ArcaneText('Note: This is important information.'),
  ],
)