Interactive panel. Press Escape or the close button to dismiss.
A new dimension in modal UX. The Visor HUD — a glass panel that descends from the nav bar, replacing traditional modals with a fluid, spatially-grounded reveal. Every VRIL LABS component, unified in one SDK.
Click any panel below to launch the Visor HUD with different content configurations. Each variant demonstrates a distinct use-case pattern from the VRIL LABS component library.
Rich introductory panel with feature overview, quick-start steps, and action buttons.
API key management, notification preferences, and account configuration in one glass pane.
Inline document preview with metadata, tags, citations, and download actions — zero page navigation.
Every visual decision encoded as a CSS custom property. The token system supports dark mode, light mode, high-contrast, and print out of the box.
Every text size uses clamp() for viewport-responsive sizing without media query breakpoints. Three typefaces, each with a specific role.
Geometric, futuristic. Every heading, hero title, and card name. Weights 400–800. Communicates authority without aggression.
Neutral, legible at every size. All paragraph text, button labels, form fields. Weights 300–600. The invisible workhorse of the VRIL design system.
Section labels · hex values · code · API paths · token names · console output
Syne → -apple-system → BlinkMacSystemFont → Segoe UI → system-ui → sans-serif. Inter follows the same chain. Atkinson Hyperlegible Mono → Fira Code → Consolas → monospace. Every tier covered, every platform.
Every component that appears across the VRIL LABS website family — codified, accessible, and exportable as a single self-contained CSS block.
Standard card with top accent bar, hover transform, and icon area. Colour-variable via --fcc.
All accents driven by a single --fcc custom property: border-color, icon stroke, label colour, and top bar.
Backdrop-filter + neumorphic inset shadows + top rim gradient. Degrades gracefully on non-supporting browsers.
One CSS file, one JS file, three lines of HTML. No build step required. Works with React, Vue, Svelte, plain HTML, or any CMS.
<!-- In <head> -->
<link rel="stylesheet"
href="https://cdn.vril.li/sdk/v1/vril.min.css">
<!-- Before </body> -->
<script
src="https://cdn.vril.li/sdk/v1/vril.min.js"
defer></script>
# npm
npm install @vrillabs/sdk
# yarn
yarn add @vrillabs/sdk
# pnpm
pnpm add @vrillabs/sdk
<!-- 1. Overlay (placed before nav in DOM) -->
<div id="cw-overlay" aria-hidden="true"></div>
<!-- 2. CrystalWindow panel (anchored below nav via top: var(--cw-nav-h)) -->
<div id="crystalwindow"
role="dialog" aria-modal="true"
aria-labelledby="cw-title"
style="top: var(--cw-nav-h)">
<div class="cw-glass">
<div class="cw-handle" id="cw-handle">
<div class="cw-handle-bar"></div>
</div>
<div class="cw-inner">
<div class="cw-header">
<h2 id="cw-title">Panel Title</h2>
<button class="cw-close" id="cw-close" aria-label="Close">✕</button>
</div>
<div class="cw-body" id="cw-body"></div>
</div>
<div class="cw-reflect" aria-hidden="true"></div>
</div>
</div>
<!-- 3. Nav must be sibling AFTER both #cw-overlay and #crystalwindow -->
<nav class="nav" id="nav">...</nav>
// Open with a panel ID (matches data-cw-panel="…" on content)
CrystalWindow.open('my-panel-id');
// Open with dynamic title + HTML content
CrystalWindow.open({
id: 'dynamic',
title: 'Hello from JS',
badge: 'New Feature',
content: `<p>Rendered at runtime.</p>`,
onOpen: () => console.log('opened'),
});
// Close programmatically
CrystalWindow.close();
// Query current state
const isOpen = CrystalWindow.isOpen();
const panelId = CrystalWindow.currentPanel();
// Register a panel programmatically (React, Vue, etc.)
CrystalWindow.register('settings', {
title: 'Settings',
badge: 'Config',
html: '<div class="cw-body"><p>Settings content</p></div>',
});
// Listen to global events
window.addEventListener('cw:open', (e) => {
console.log('Panel opened:', e.detail.id);
});
window.addEventListener('cw:close', (e) => {
console.log('Panel closed:', e.detail.id);
});
Every micro-decision — from will-change placement to touch event delegation — is made with rendering performance and accessibility as co-equal first-class constraints.
The Visor reveal uses only transform: translateY() and opacity — the only two CSS properties that skip layout and paint on every browser engine. Zero layout thrashing guaranteed.
1 ) CSS custom props + backdrop-filter + @starting-style. 2 ) CSS transitions only (no BF). 3 ) JS rAF polyfill. 4 ) CSS class toggle only. 5 ) <details> HTML no-JS fallback. IE9 through Chrome 124 covered.
Focus trap on open. Escape key close. ARIA role="dialog" + aria-modal. Live region badge updates. prefers-reduced-motion: all animations disabled in a single media query block. No separate accessibility layer needed.
One click listener on document.body for all CrystalWindow triggers. Zero per-button listeners. Panel content is rendered lazily on first open, then cached in a document fragment. GC-safe cleanup on destroy().
Native touch event handler on the drag handle. Velocity-based threshold: if swipe speed > 0.5px/ms or displacement > 120px, close is triggered. Uses passive touch events so scroll never blocks the main thread.
All inline styles in the SDK can be replaced by CSS custom property declarations. An optional CSP-safe mode moves top/height to a stylesheet, compatible with Content-Security-Policy: style-src 'self'.
| Browser | Animation | Backdrop | CSS Props | Full SDK |
|---|---|---|---|---|
| Chrome 90+ | ✓ | ✓ | ✓ | ✓ Full |
| Safari 14+ | ✓ | ✓ -webkit- | ✓ | ✓ Full |
| Firefox 89+ | ✓ | ≥ v103 | ✓ | ✓ Full |
| Edge 90+ | ✓ | ✓ | ✓ | ✓ Full |
| IE 11 | JS fallback | ✗ | ✗ | Tier 3 |
| IE 9 / IE 10 | class only | ✗ | ✗ | Tier 4 |