Arche Design System

Foundations Motion and focus

curranleeds.com

Foundations

Motion and focus

One easing curve, three durations, and a focus ring that is the same everywhere.

Motion

Everything uses a Quad ease-in-out curve. Duration depends on how much changes: a hover is quick, a full-screen overlay is slower.

CSS nameValueUsed for
--arche-motion-easecubic-bezier(0.455, 0.03, 0.515, 0.955)Every transition
--arche-motion-fast150msHovers and pressed states
--arche-motion-medium250msAccordion and navigation
--arche-motion-slow400msMenu overlay and theme switch

Reduced motion

When a visitor's system asks for reduced motion, all three durations become 0ms. State changes still show; they just happen at once. Try it by turning on "Reduce motion" in your operating system's accessibility settings.

Focus ring

Every interactive element shows a 4px ring with a 2px gap when it takes keyboard focus. The ring is never red, even on error fields. Press Tab on this page to see it on the links and buttons.

CSS nameUsed on
--arche-border-focus-ringThe page surface. Black in Light, white in Dark.
--arche-border-focus-ring-on-brandThe blue band. White, because black on Blue 500 fails 3:1.
--arche-border-focus-ring-on-secondaryThe yellow band. Near-black.
--arche-focus-ring-width4px
--arche-focus-ring-offset2px
.button:focus-visible {
  outline: var(--arche-focus-ring-width) solid var(--arche-border-focus-ring);
  outline-offset: var(--arche-focus-ring-offset);
}

Do not put overflow: hidden on a parent of a focusable element unless it leaves 4px of room around it. The ring will be cut off.

Up next

Accessibility

The WCAG 2.1 AA checks built into the components.