Skip to content

Design system

Documentation

DesignComponents / Aura

Components / Aura

Beta

Aura

Use Aura to frame a Card or other large surface with a decorative gradient beam or glow.

On this page

Examples

Beam around a Card

Wrap an existing surface to draw a sweeping gradient ring along its edge.

Launch ready

A gradient beam sweeps the edge of the surface it wraps.

Aura beam wrapping a Card

Beam and glow

The same gradient can trace the edge as a beam or spread behind the surface as a glow.

Beam
Glow

Aura beam and glow effects side by side

Gradient palettes

Rainbow, holographic, gold, and silver recipes reuse the existing color tokens.

Rainbow
Holographic
Gold
Silver

Aura gradient palette comparison

Single color

Use one color family for a monochromatic gradient built from the shared hue tokens.

Violet
Blue
Green
Amber
Pink
Cyan

Aura single-color gradients

Beam coverage

Light the full ring, half of it, or a short travelling comet.

Full
75%
Half
25%
Comet

Aura beam coverage comparison

Sweep speed

Slow, normal, and fast pacing for the travelling beam.

Slow
Normal
Fast

Aura sweep speed comparison

Static gradient

Turn off the sweep for a still frame; reduced-motion users always get this rendering.

A still gradient frame with no motion.

Aura static gradient frame

Effect playground

Combine effect, palette, coverage, speed, radius, and motion on a large surface.

Wrap any large surface.

Aura playground preview

When to use

Use Aura to add emphasis to a hero Card, a pricing tier, or a feature panel where a moving gradient helps the surface stand out. Aura is purely decorative: it wraps content and never adds behavior, so it is a poor fit for dense lists, form fields, or anything that already competes for attention.

Usage

aura-basic.tsx
import { Aura } from "@phuctech/ui/components/aura";
import { Card, CardContent, CardHeader, CardTitle } from "@phuctech/ui/components/card";

export function Example() {
  return (
    <Aura coverage="three-quarter">
      <Card>
        <CardHeader>
          <CardTitle>Launch ready</CardTitle>
        </CardHeader>
        <CardContent>A gradient beam sweeps the edge of the surface it wraps.</CardContent>
      </Card>
    </Aura>
  );
}

Aura wraps its children and renders one decorative layer marked aria-hidden and pointer-events: none, so it never blocks clicks or focus. Match the radius prop to the wrapped surface so the frame follows its corners.

Variants

Aura effects and palettes
PropValuesUse for
effectbeam, glowbeam traces a ring along the edge; glow spreads a blurred halo behind the surface.
paletterainbow, holo, gold, silverMulti-color gradient recipe. Effect and palette are independent, so any combination works.
colorany ColorPalette hue (violet, blue, …)Single-hue gradient from one color family. Overrides palette when set.
coveragefull, three-quarter, half, quarter, cometHow much of the border the beam lights (100% / 75% / 50% / 25% / a short comet). Partial coverage makes the travelling motion obvious; glow always fills.
speedslow, normal, fastSweep pacing (8s / 4s / 2s per revolution).
radiusmd, lg, xl, 2xl, fullMatch the corner radius of the wrapped surface.
animatedtrue, falseTurn the sweep off for a static frame.

API

Component API
PropTypeDefaultDescriptionConstraints
effect"beam" | "glow""beam"Edge ring or blurred halo.Independent from palette.
palette"rainbow" | "holo" | "gold" | "silver""rainbow"Decorative multi-color gradient recipe.Each reuses existing color tokens.
colorColorPalette—Single-hue gradient from one color family.Overrides palette when set.
coverage"full" | "three-quarter" | "half" | "quarter" | "comet""full"How much of the border the beam lights (100% / 75% / 50% / 25% / comet).Applies to beam; glow always fills.
speed"slow" | "normal" | "fast""normal"Sweep pacing (8s / 4s / 2s).No effect when animated is false.
radius"md" | "lg" | "xl" | "2xl" | "full""xl"Corner radius of the frame.Match the wrapped surface so corners align.
animatedbooleantrueAnimate the gradient sweep.Reduced-motion users always get the static rendering.
childrenReactNoderequiredThe surface to frame, usually a Card.Aura is a wrapper; keep interactive content in the children.
...div propsReact.ComponentPropsWithRef<"div">—className, style, ref, and other native div attributes are forwarded.className merges after the built-in classes.

Tokens

Component tokens
TokenRoleEffective valueUsage
--color-*-400 / --color-*-500Gradient stopsprimitive color scalesEach palette composes its sweep from the existing color tokens.
--color-<hue>-300/500/700Single-color stopsone hue familyThe color prop builds a light-to-dark sweep from one hue.
--radius-*Frame geometrymd / lg / xl / 2xl / fullThe radius prop maps to the shared corner scale.
--aura-thicknessBeam width2pxOverride on the element to widen or narrow the ring.
--aura-arcLit arc270deg / 180deg / 90deg / 60degSet by the coverage prop (75% / half / 25% / comet) to size the travelling segment.
--aura-spread / --aura-blurGlow size1.25rem / 2remOverride to control how far the halo reaches and softens.
--aura-durationSweep speed8s / 4s / 2sSet by the speed prop; override for a custom pace.

Accessibility

  • The gradient layer is aria-hidden and non-interactive, so assistive technology only sees the wrapped content.
  • Motion respects prefers-reduced-motion: the sweep stops and the gradient renders static.
  • Never rely on the aura to convey meaning or state; it is decoration only.
  • Keep readable contrast on the wrapped surface; the frame sits at the edge and does not change the content background.

Do and don’t

Do

Reserve Aura for one or two hero surfaces where the extra emphasis earns its motion.

Don’t

Wrap many surfaces at once or use it on form fields, list rows, or dense tables.

  • Card is the surface Aura most often frames.
  • Colors documents the color tokens each palette reuses.