Skip to main content
196

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Web docs
Motion playground

Make a change easier to follow.

Try real component transitions. Keep motion brief, purposeful, and optional. All examples use local browser animation with no external service.

System preference is respected automatically.

Presence

Introduce a component

A clear next step

Fade or move a component into place without changing its meaning.

Disclosure

Expand the details

What happens in older browsers?

The content opens immediately. Supporting browsers smoothly animate its natural height. Native keyboard and screen-reader behavior stay intact.

Use the same transition with Accordion. No extra runtime is needed.

Overlay

Open a focused task

Dialogs fade and scale. Drawers rise from the bottom; sheets enter from the side. All share Lumen timing, a fading backdrop, and Escape with focus restoration.

Review the transition

The dialog owns its focus and keyboard behavior; CSS owns the visual transition.

Review the drawer

A bottom drawer keeps the task close to its context. Motion is optional; keyboard behavior stays native.

Review the sheet

A side sheet gives a longer task its own space. Escape returns you to the trigger.

Feedback

Loading to success

This is a simulated save. No data is sent.

Ready to preview.

Collection

Follow an item entering or leaving

Insertion and removal are optional. The application owns the list and moves focus before an item exits.

Example item 1

1 example item.

Use the shared foundation

Presence animates a mounted DOM reference in Astro, React, or Web Components. Keep it on a wrapper when a component already owns its transform or animation. Abort stale requests on unmount; cancelled exits must not remove a newly reopened item.

typescript
import { animateLumenPresence } from '@santi020k/lumen-core'

// Mount with your framework first, then animate its DOM ref.
await animateLumenPresence(element, { preset: 'slide-up' })

// Move focus out before disabling interaction and exiting.
element.inert = true
const result = await animateLumenPresence(element, { phase: 'exit' })
if (result !== 'cancelled') element.remove()
else element.inert = false

ScrollReveal · RevealGroup · AnimatedNumber

Web docsFull catalog