Principles
Light doesn't decorate, it informs.
The rules
- Dark mode first
- Shader UI is designed for dark interfaces.
- Light follows state
- The state is read from the HTML (native validity, aria-invalid, aria-busy): developers never describe the animation.
- The edge, not the fill
- Effects live on the outline, content stays sharp.
- One effect, one reason
- At rest, the interface is still: zero frames.
- Short, single, one at a time
- A loop only for an ongoing state.
- Motion tells a story
- The wave chains links in reading order; between two radios, light follows the path of the choice.
- One colour, one meaning
- Violet: in progress, guidance. Green: valid. Coral: error. White: required, ticked choice.
- Nobody looking, nothing lit
- Off screen, under a modal or under the keyboard: light is not played.
- Clarity, not fireworks
Accessibility
- Light doubles information, never carries it alone: text, icon, aria-invalid, aria-live.
- At most 3 effects per second. Motion can be turned off, prefers-reduced-motion is honoured.
- Resting border and focus at 3:1 contrast, without relying on the shader.
- A loading loop stops after 5 s.
Adaptation
Before lighting anything, the library knows where it is.
What the library sees
Before each effect, the library checks that the element can be seen: on screen, not hidden, not under a modal, not under the keyboard. Here is what it knows about this block.
- State
- unknown
- Seen
- no
Scroll the page: the state changes as it passes, “seen” after half a second of visibility. Switch tabs: hidden.
What the library listens to
The device, the last input, the rendering and your preferences, detected right now in your browser. Nothing is sent anywhere.
WCAG criteria
The WCAG (Web Content Accessibility Guidelines) are the web's accessibility rules, published by the W3C. Current version: 2.2. Here are the criteria cited on this site, with their Understanding page.
Use of Color · Non-text Contrast · Pause, Stop, Hide · Three Flashes or Below Threshold · Animation from Interactions · Link Purpose (In Context) · Focus Visible · Location · Target Size (Minimum) · Error Identification · Labels or Instructions · Status Messages