Lens UI Skill
Build crisp, high-insight, light-only executive web applications with refined Liquid Glass optical surfaces—and keep them regression-free across dozens of Coding Agent iterations.
When to Activate
- Creating a new dashboard, workbench, admin console, analytics hub, planning/Gantt view, workflow editor, or interactive learning workspace.
- Refactoring a generic AI-generated frontend ("hollow big-number cards", native
<select>dropdowns, rainbow badges, broken CSS) into a disciplined design system. - Configuring multi-theme brand accents without leaking company-specific branding or breaking WCAG 2.1 contrast.
- Locking accepted UI pages against unintended visual regressions during multi-turn Agent coding.
Mandatory 5-Step Workflow
Step 1 — Pick the Theme Accent & Establish the Viewport-Split Shell
- Choose one of the 6 WCAG-verified accent themes via
data-accenton<html>or the root shell (see Theme Palettes):citrus-lime— Original studio lime-green accent with deep botanical ink (#84cc16/#46730c).solar-orange— Executive warm ember balanced against cool pearl glass (#ff5a1f/#c2410c).glacier-blue— Crisp sapphire precision (#2563eb/#1d4ed8).emerald-mint— Calm clinical/fintech precision (#10b981/#047857).royal-indigo— Composed AI & research studio tone (#4f46e5/#4338ca).graphite-mono— Swiss monochrome boardroom discipline (#181c22).
- Wrap the app in a
100dvhViewport-Split Shell (.lg-shell):- Fixed
68pxsymmetric topbar (14pxtop/bottom margin +40pxequal-height floating glass controls: left brand pill, center borderless nav capsule with sliding white glass lens, right utility pills). - Independent scrolling main viewport (
.lg-viewport-scroll) sharingmax-width: 1400pxand24pxhorizontal padding with the topbar for exact0pxvertical edge alignment. - Read Design Constitution for the 3-layer optical recipes, typography, and forbidden anti-patterns.
- Fixed
Step 2 — Enforce the 6 Mandatory Shared Primitives
Never hand-roll ad-hoc tables, bare <select> tags, <input type="date">, or inconsistent modals inside page files. Compose from the 6 primitives specified in Primitives Contract:
<DataTable>/<DataTableShell>— Single-layer frosted table card (#f8fafcheader,13px/14px × 16pxcell rhythm,20pxouter column edges, sticky header, built-in client pagination).<CompactInput>/<PopoverSelect>/<CreatableSelect>/<DatePickerPopover>—34pxquiet controls with14pxpure-white Portal popovers (z-index: 9500, smart viewport flip, auto-search whenoptions.length > 8, circular1:1calendar grid). Hard ban on raw<select>andtype="date".<ModalShell>/<ModalGrid>— Viewport-centered22pxmodal with frosted backdrop, circular close button, 2-column compact form grid, and Portal-safe popover mounting inside<dialog>/ modal containers.<MetricCard>— Tabular numbers + 8-State Honest Data Contract + 3-layer reading path.<FilterPills>/<SegmentedControl>— Crisp white-glass capsules with deep charcoal active pill (zero rainbow pill strips).<CleanList>/<CleanListItem>— Minimalist1pxhairline list with quiet status dots.
Step 3 — Apply Honest Data & Chart Semantics
Before rendering any KPI, badge, or chart, consult Data Honesty & Charts:
- Implement the 8 explicit data states:
loading,ready,empty,not_connected,insufficient,error,stale,forbidden. - Follow the 3-layer executive reading path: 10-second headline conclusion (question-style title + value + comparison/denominator) → hover breakdown → click-through drilldown.
- Never fabricate trendlines from single-point snapshots, never fill missing time points with
0, and never render decorative fake sparklines or heartbeat animations.
Step 4 — Select the Right Scenario Pattern
Match your product screen to the proven multi-scenario blueprints in Scenario Patterns:
- Workspace Home: Neutral concave-notch header card + semi-circular workload gauge + allocation tracks + clean checklist + mini calendar.
- Executive Overview: 4-up honest KPI strip + 360° Polar Matrix Ring + equal-height Bento Gallery Cards + 3-station Milestone Rail.
- Planning & Gantt:
58pxreal-time sticky capacity strip (quiet<80%, highlighted≥80%) + sleek21pxborderless pastel timeline bars. - Workflow & Variant Studio: Orthogonal 2-axis filter bar (Module × Team/Region) + left-striped execution accordion cards + pure-SVG vector export (zero
<foreignObject>).
Step 5 — Run the 5-Gate Anti-Regression Guard Before Delivery
Run the bundled zero-dependency verifier to prove zero style pollution, zero native control regressions, and valid WCAG contrast:
node ./scripts/ui-guard.mjs --root . --css dist/lens-ui.css --tokens tokens/tokens.json --src src
If any gate fails, fix the root cause—never disable lint rules, raise !important ceilings, or bypass frozen module locks without explicit user approval.