A wider screen, please

This page features interactive demos and side-by-side code samples that need at least 340 pixels of horizontal space. Please widen your browser window, or rotate your device, to continue.

Morpheus v0.3.0
v0.3.0

Aura#

Component <neo-aura> is a decorative light around the element it wraps. It has a ring in its padding with a light that rotates along it, and a blurred glow behind. Wrap one element that has an opaque background, such as a button, input, or card. Custom properties set the look and the motion. The light holds still under reduced motion and becomes a solid Highlight ring in forced-colors mode. The layers live in an open shadow root; style them with ::part().

Default
Lights
Highlight one option
Form control
Ring width
Color and track
Any element
Disabled
DeactivateRenameDuplicate
Delete
New state Toggle autoplay
Loading...
HTMLCSS

The selected state's markup and its scoped CSS. The CSS is wrapped in <style>@scope { ... }</style> and applies to the preview only. Edits change the preview above, applied live while Sync is on, or when you click Patch or Replace. Patch morphs the preview; Replace swaps it outright.

ReplacePatch

Signals

Datastar signals declared in the selected state's markup. Change a value to update the preview, applied live while Sync is on, or when you click Patch.

Patch

Reference#

Attributes #

NameTypeDefaultDescription
disabledboolean observedfalseFades the light out and stops its animations. The wrapped element does not move because the aura keeps its padding, and it stays enabled.

Parts #

NameDescription
::part(ring)The ring in the aura's padding. Masked to the padding, it never shows through the wrapped element.
::part(glow)The 2 blurred layers behind the wrapped element, a tight glow and a wide halo. Hide them for a ring without a glow.
::part(light)The gradient box inside the ring and inside each glow. It carries the rotation.

CSS variables #

NameDefaultDescription
--neo-aura-colorvar(--accent, currentColor)Light color, used by the default --neo-aura-gradient.
--neo-aura-gradientconic-gradient(transparent 225deg, var(--neo-aura-color))The light. Any CSS image, rotated about the center of the aura. cq units in it measure the aura's box.
--neo-aura-width0.125remRing thickness, applied as the aura's padding. 0 leaves only the glow.
--neo-aura-radiusmeasuredCorner radius of the wrapped element, 1 value for all corners. Unset, the aura measures each corner of the element's computed border-radius, and measures again when the element changes, resizes, or is replaced. <neo-buttongroup>, <neo-toggle-group>, <neo-select>, <neo-combobox>, and <neo-textinput> draw their rounded box inside, not on the host; for them the aura reads their radius token. Set it to override.
--neo-aura-spin-duration6s1 turn of the light. 0s holds it still.
--neo-aura-pulse-duration0s1 pulse of the glow. 0s turns the pulse off.
--neo-aura-track-colortransparentRing color under the light.

Examples#

Lights#

Each light is a set of custom properties on a class. Copy one from the CSS tab. --neo-aura-gradient holds the image, which rotates about the center of the aura. The glow recipe stops the rotation and pulses the glow instead.

DefaultDualRainbowHoloGoldSilverGlow

Highlight one option#

Marks the recommended option in a set. The aura has no accessible role or name. State the emphasis in text as well, here with the Most popular badge.

Starter

For side projects

$0 per month

  • Up to 3 projects
  • Community forum
  • 7-day history
Start free
Most popular

Team

For growing teams

$12 per seat, monthly

  • Unlimited projects
  • SSO and audit log
  • 90-day history
Start trial

Enterprise

For regulated industries

Custom annual contract

  • Dedicated support
  • Data residency
  • Unlimited history
Contact sales

Form control#

The ring takes the corner radius of the element it wraps, here <neo-input-group>. The control keeps its own focus ring. Tab to the field to see it.

Ask

Ring width#

--neo-aura-width sets the ring thickness, which is also the aura's padding. At 0 only the glow remains.

Glow only1px2px4px

Color and track#

--neo-aura-color colors the light; --neo-aura-track-color fills the ring under it.

LiveSyncing

Any element#

The aura measures the corners of the element it wraps, kit component or not. The square image here needs no configuration. Set --neo-aura-radius to override the measured value.

The Cheshire cat

Disabled#

disabled fades the light out and stops its animations. The wrapped element does not move because the aura keeps its padding, and it stays enabled. Flip the switch to see it.

Publish

Settings

Theme

DefaultSunshineOceanMatrixRose☀ ◐ ☾

Accessibility

Playgrounds

Server Simulator