Skip to content
Back

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-playground

Light playground

Morning runFour checks passed, one waits for you.
Review3 new

Lamp at 26% across, 18% down

The code is part of Oxyn Pro

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.

Get Pro

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.

Terminal
oxyn add light-playground

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Default

Lamp top left: shadows fall down and to the right.

Light playground

Morning runFour checks passed, one waits for you.
Review3 new

Lamp at 26% across, 18% down

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Low sun

Lamp low on the right with full strength: long, soft shadows to the left.

Light playground

Morning runFour checks passed, one waits for you.
Review3 new

Lamp at 92% across, 70% down

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Glow

Glow: each card gets a lit rim on the side facing the lamp instead of a shadow.

Light playground

Morning runFour checks passed, one waits for you.
Review3 new

Lamp at 60% across, 12% down

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

LightPlayground

PropTypeDefaultDescription
default_xf6426.0Lamp position, % across.
default_yf6418.0Lamp position, % down.
default_strengthf6460.0Shadow strength, 0–100.
default_modeString"shadow"`shadow` or `glow`.
on_moveEventHandler<(f64, f64)>—The lamp moved: (x %, y %).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabShadow / Glow, the lamp, Strength
Arrow keys on the lampMove 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 LightPlayground from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: LightPlaygroundEl in oxyn_gpui.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI