Skip to content
🏳️‍⚧️ TRANSLUX is live — Track 530+ anti-LGBTQ+ bills, organize mutual aid, and build UIs that stand for something. Support the movement →

UI Component Library

🎨 TRANSLUX UI — Drop-In Glass Styling

Section titled “🎨 TRANSLUX UI — Drop-In Glass Styling”

TRANSLUX isn’t a framework that forces its own markup. It’s a design sheet that transforms your existing semantic HTML into glassmorphic, accessible, premium UI — just like Bootstrap or NanoCSS, but with soul.

Drop it in. Watch everything glow.


This is a paragraph of body text rendered in Cormorant Garamond, our signature thin serif. It’s designed for maximum legibility at all sizes while maintaining an elegant, editorial character. Links look like this example link with the TRANSLUX pink accent.

Blockquote — “Every site that drops TRANSLUX in becomes a tiny act of resistance.” — Community Voices



ElementEffectCategory
<h1><h6>Playfair Display, weighted, tracedTypography
<p>, <li>Cormorant Garamond, thin, readableTypography
<button>Glass background, pink glow on hoverInteractive
<input>, <select>Frosted glass, focus glow borderForm
<table>Alternating glass rows, sticky headerData
<blockquote>Left-border accent, glass panelContent
<a>Pink accent, subtle hover liftNavigation

Glass Surface

Every card automatically receives backdrop-filter: blur(16px), translucent background, pink-glow borders, and hover lift animation. Zero extra classes needed.

Dark Mode Ready

All components respond to [data-theme='dark'] with deep pink-black glass panels and cyan accent glows. Toggle-ready out of the box.

Accessibility First

Focus-visible styles with pink glow rings. High contrast ratios maintained. Screen reader friendly. No cursor hijacking.

Mobile Responsive

Every element adapts. Cards stack. Tables scroll. Inputs scale. The glassmorphic effect degrades gracefully on low-power devices.


CoreAdapterEffectCSSCivicUtil

  1. Install TRANSLUX via npm i translux
  2. Import the stylesheet into your entry CSS
  3. Add data-translux to any element you want to glass-ify
  4. Watch your UI transform ✨
  • 🧊 GlassSurface — The foundational bound surface
  • 💡 GlowEngine — Inverse-square light falloff
  • 🔮 RefractionEngine — SVG displacement maps
  • 🌈 ChromaticEngine — RGB channel separation
  • 🤖 FSMController — Four-state interaction machine

TRANSLUX applies styling through CSS custom properties and nested selectors. When you add the TRANSLUX stylesheet to any webpage, it:

  1. Sets global typography tokens (--sl-font, heading families)
  2. Applies glassmorphic backdrop-filter to recognized surfaces
  3. Adds hover/focus micro-animations to interactive elements
  4. Injects solidarity metadata into your page’s <head>

No JavaScript required for styling. No framework lock-in. Just CSS.

/* This is all you need */
@import 'translux/glass.css';
/* That's it. Your page is now glassmorphic. */