Glin UI
Signature / Molecule

Light Leak

Simulated lens flare and light leak overlay with drifting animation.

Film presets

Every frame keeps its warmth

Twelve presets tuned on real film scans. Apply once, batch export a whole shoot and keep the original files untouched.

Works with

  • Vercel
  • GitHub
  • Cloudflare
  • Astro

Installation$

Install from
pnpm dlx @glinui/cli@latest add light-leak

Prefer the package?

Usage$

Place LightLeak inside a relative container. The warm gradient overlays drift across the surface.

Examples$

Variants$

Default
Cool
Three leaks
import { LightLeak } from "@glinui/ui"
export function Variants() {
return (
<div data-glin-theme="dark" className="grid w-full gap-3 sm:grid-cols-3">
<div className="relative isolate flex h-44 items-end overflow-hidden rounded-xl bg-[var(--surface-0)] p-3">
<LightLeak intensity={0.6} />
<span className="relative z-10 rounded-full bg-black/70 px-2.5 py-1 text-xs font-medium text-white">Default</span>
</div>
<div className="relative isolate flex h-44 items-end overflow-hidden rounded-xl bg-[var(--surface-0)] p-3">
<LightLeak colors={["#06b6d4", "#3b82f6", "#8b5cf6"]} intensity={0.5} />
<span className="relative z-10 rounded-full bg-black/70 px-2.5 py-1 text-xs font-medium text-white">Cool</span>
</div>
<div className="relative isolate flex h-44 items-end overflow-hidden rounded-xl bg-[var(--surface-0)] p-3">
<LightLeak count={3} duration={14} intensity={0.5} />
<span className="relative z-10 rounded-full bg-black/70 px-2.5 py-1 text-xs font-medium text-white">Three leaks</span>
</div>
</div>
)
}

Behind a dashboard header$

Production, last 24 hours

API overview

Requests
2.41M
+8.2% vs yesterday
p95 latency
184 ms
-12 ms vs yesterday
Error rate
0.03%
-0.01% vs yesterday
import { LightLeak, Button, Heading, Text } from "@glinui/ui"
const stats = [
["Requests", "2.41M", "+8.2%"],
["p95 latency", "184 ms", "-12 ms"],
["Error rate", "0.03%", "-0.01%"]
]
export function UsageHeader() {
return (
<section data-glin-theme="dark" className="relative isolate flex min-h-[22rem] w-full flex-col justify-end gap-6 overflow-hidden rounded-xl bg-[var(--surface-0)] p-6 sm:p-8">
<LightLeak intensity={0.5} />
<div className="relative z-10 flex flex-wrap items-end justify-between gap-4">
<div className="flex flex-col gap-1">
<Text variant="eyebrow">Production, last 24 hours</Text>
<Heading level={2} size="md">API overview</Heading>
</div>
<div className="flex gap-2">
<Button size="sm" variant="outline">Export CSV</Button>
<Button size="sm">Create alert</Button>
</div>
</div>
<dl className="relative z-10 grid gap-3 sm:grid-cols-3">
{stats.map(([label, value, delta]) => (
<div key={label} className="rounded-xl border border-[var(--line-soft)] bg-[var(--surface-1)] p-4">
<dt className="text-xs text-[var(--color-muted)]">{label}</dt>
<dd className="mt-1 text-2xl font-semibold tabular-nums text-[var(--color-foreground)]">{value}</dd>
<dd className="text-xs text-[var(--tone-success-text)]">{delta} vs yesterday</dd>
</div>
))}
</dl>
</section>
)
}

Accessibility$

  • Renders with aria-hidden, invisible to assistive technologies.
  • Purely decorative.

Reduced Motion$

Animations are paused via motion-reduce:[animation:none].

API Reference$

PropTypeRequiredDefaultDescription
blurnumberNo60Blur amount in px
colorsstring[]No["var(--tone-warning)", "var(--tone-danger)", "var(--color-accent)"]Colors for the light leaks. Defaults come from theme tokens.
countnumberNo3Number of light leak layers
durationnumberNo6Animation duration in seconds
intensitynumberNo0.3Intensity/opacity (0-1)

Source$

import { LightLeak } from "@glinui/ui"
packages/ui/src/components/light-leak.tsx

Generated API Snapshot

Beta

Auto-extracted from TypeScript source in packages/ui/src/components/light-leak.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.

Generated: 2026-10-08T01:41:21.546Z · Full index: /docs/api-metadata

Primary Props Type

LightLeakProps

LightLeakProps

PropTypeRequiredDefaultDescription
blurnumberNo60Blur amount in px
colorsstring[]No["var(--tone-warning)", "var(--tone-danger)", "var(--color-accent)"]Colors for the light leaks. Defaults come from theme tokens.
countnumberNo3Number of light leak layers
durationnumberNo6Animation duration in seconds
intensitynumberNo0.3Intensity/opacity (0-1)