Light playgroundPro
Oxyn original: drag a lamp over a small interface and its cards cast shadows away from it, or glow on the side that faces it.
oxyn add light-playgroundLight playground
Lamp at 26% across, 18% down
The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- Show how depth reads in a theme by letting someone move the light: shadows and highlights follow the lamp.
When not to use
- Picture tiles we draw ourselves plus Your own, with Film, Static or Dither laid over the picture and a home screen preview: use Background picker instead.
- Eight mini-window swatches: use Theme grid instead.
- Oxyn original: use Theme split instead.
Installation
Light playground is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add light-playgroundUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Default
Lamp top left: shadows fall down and to the right.
Light playground
Lamp at 26% across, 18% down
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Low sun
Lamp low on the right with full strength: long, soft shadows to the left.
Light playground
Lamp at 92% across, 70% down
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Glow
Glow: each card gets a lit rim on the side facing the lamp instead of a shadow.
Light playground
Lamp at 60% across, 12% down
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
LightPlayground
| Prop | Type | Default | Description |
|---|---|---|---|
default_x | f64 | 26.0 | Lamp position, % across. |
default_y | f64 | 18.0 | Lamp position, % down. |
default_strength | f64 | 60.0 | Shadow strength, 0–100. |
default_mode | String | "shadow" | `shadow` or `glow`. |
on_move | EventHandler<(f64, f64)> | — | The lamp moved: (x %, y %). |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Shadow / Glow, the lamp, Strength |
| Arrow keys on the lamp | Move it 4 % at a time |
Accessibility
- The lamp is a button that moves with the arrow keys; its position is said in a polite note.
- Dragging works anywhere on the stage; the cards are decoration and not focusable.
Responsive behaviour
- 560 px card; the stage keeps its shape and the sample card widens under 480 px.
Edge cases (spec)
The stage keeps its height (220 px under 480 px); the sample card widens.
Notes for AI
- Import
LightPlaygroundfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
LightPlaygroundElinoxyn_gpui. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.