luminant.dev
cd/m2 1248

luminant.dev

A developer framework for interfaces that emit light.

v0.7.3 CSS / WebGL MIT
refract

// the light library

Six wavelengths. One framework.

Each module emits its own band of the visible spectrum. Compose interfaces by selecting wavelengths the way a colorist mixes light.

01 650nm · red

Filament

Heat-warm core primitives. Buttons, focus rings, and pulse states that feel like a tungsten coil reaching working temperature. Filament is the runtime that ignites the rest of the framework.

import { Filament } from '@luminant/core'
const ui = Filament({ kelvin: 2700 })
02 600nm · orange

Ember

Surface materials with subsurface scattering. Cards, sheets, and modals that hold light beneath their skin and release it slowly when the cursor approaches.

const sheet = ui.surface({
  material: 'ember',
  scatter: 0.42
})
03 580nm · yellow

Halide

Typography that reads like signage at dusk. Variable-axis display faces, text-shadow primitives, and a luminance-aware contrast engine that keeps glyphs legible against any radiant ground.

const headline = ui.type({
  axis: { wght: 520, opsz: 96 },
  glow: 0.3
})
04 540nm · green

Phosphor

Persistence-of-vision animation. Trails, motion lines, and decay envelopes that mirror the way old phosphor screens held an image after the beam had moved on.

ui.animate(node, {
  trail: 12,
  decay: 'exp(-t/0.4)'
})
05 470nm · blue

Cyan Field

Layout and grid as a luminance field. Container queries, optical-center alignment, and a column system measured in lux rather than pixels — denser where the eye expects more light.

const grid = ui.field({
  unit: 'lux',
  density: 680
})
06 420nm · violet

Quanta

State as discrete photons. A reactive store where every update is a packet — observable, attributable, and re-emittable. The shortest wavelength carries the highest energy and the strictest types.

const store = ui.quanta<Mode>({
  mode: 'idle'
})
store.emit({ mode: 'glow' })

// the spectrum

From 380 to 750 nanometers.

Every component aligns to a wavelength. Sweep the spectrum to preview luminance, color temperature, and energy curves for each band.

380 450 520 580 620 680 750
wavelength 540 nm
band green
module Phosphor
energy 2.30 eV
cd/m² 1180

// install

Switch the lights on.

One package. Tree-shakable wavelengths. Works in any framework — or none.

$ npm install @luminant/core @luminant/spectrum

No build step required. Works in Vite, Next, Astro, and plain HTML.

app.tsx
import { Filament, Phosphor, Quanta } from '@luminant/core'

const ui = Filament({ kelvin: 2700 })
const store = Quanta({ mode: 'idle' })

export function App() {
  return ui.surface({
    glow: 0.42,
    wavelength: 540,
    children: ui.type({
      text: 'hello, light',
      shadow: 20
    })
  })
}
size 11.4 kB gzipped, tree-shaken
peers 0 zero runtime dependencies
types strict TypeScript first, JS supported
render SSR · CSR · static no hydration mismatch