Five reading chrome layouts — sticky bar, circular FAB, chapter sync, bottom dock, and end-edge essay spine.
Building production-ready UIs with SonoJS and Tailwind v4
Alex Rivera
Introduction
Modern front-end development demands more than just getting things to work — it requires systems that scale, components that compose, and designs that adapt. SonoJS is built to satisfy all three. In this guide, we walk through a full-featured interface, from project setup to production.
Setting Up the Project
The fastest way to start is with the SonoJS CLI. Run npx @sonojs/ui@latest init and follow the prompts for your framework, theme tokens, and TypeScript setup. The scaffolder wires Tailwind v4 with the correct CSS imports and aliases.
Semantic Token System
One of SonoJS’s strongest features is its token hierarchy. Instead of hardcoding colors, you style with tokens like bg-primary, text-foreground, and border-border. Because these map to CSS custom properties backed by oklch values, dark mode is zero-effort: flip the dark class and every token inverts appropriately.
Responsive Layouts
Prefer logical layout utilities and breakpoint maps so grids and stacks adapt without physical left/right assumptions. Keep control heights consistent across breakpoints and let width and stacking change instead.
Accessibility by Default
Interactive SonoJS components ship with correct ARIA attributes, keyboard navigation, and focus management. Overlays handle focus trapping. Your job is semantic HTML structure — use main, nav, section, and header landmarks appropriately.
Production Checklist
Before shipping: run typecheck, verify the build, and test at 375px, 768px, and 1280px viewports. Check both light and dark modes. Ensure interactive elements have visible focus rings and aria-labels. Use Lighthouse or axe DevTools to catch remaining gaps.
Reading progress
0%
Building production-ready UIs with SonoJS and Tailwind v4
Alex Rivera
June 23, 20268 min read
Introduction
Modern front-end development demands more than just getting things to work — it requires systems that scale, components that compose, and designs that adapt. SonoJS is built to satisfy all three.
Setting Up the Project
The fastest way to start is with the SonoJS CLI. Run npx @sonojs/ui@latest init and follow the prompts for your framework, theme tokens, and TypeScript setup.
Semantic Token System
Style with tokens like bg-primary and text-foreground. Because these map to CSS custom properties backed by oklch values, dark mode is zero-effort.
Responsive Layouts
Prefer logical layout utilities so grids and stacks adapt without physical left/right assumptions. Keep control heights consistent across breakpoints.
Accessibility by Default
Interactive components ship with correct ARIA attributes, keyboard navigation, and focus management. Overlays handle focus trapping.
Production Checklist
Before shipping: run typecheck, verify the build, and test at 375px, 768px, and 1280px. Check light and dark modes and visible focus rings.
Building production-ready UIs with SonoJS and Tailwind v4
Alex Rivera
June 23, 202614 min read
Introduction
Modern front-end development demands more than just getting things to work — it requires systems that scale, components that compose, and designs that adapt across products and teams. SonoJS is built to satisfy all three without forcing a rigid architecture on your app.
This guide walks through the practical path from a fresh project to a production UI: setup, tokens, layout, accessibility, and a checklist you can reuse on every release. Keep this page open while you scroll — the chapter rail on the side tracks where you are.
If you are evaluating component kits, focus on install ergonomics, token ownership, and direction support. Those three decide whether a library survives the second product, not the first demo.
Setting Up the Project
The fastest way to start is with the SonoJS CLI. Run npx @sonojs/ui@latest init and follow the prompts for your framework, theme tokens, and TypeScript setup. The CLI writes a components map, CSS entry, and baseline dependencies so add commands land in the right folders.
After init, add only the primitives you need. Prefer small increments — button, then field, then dialog — so review stays readable. Each add installs registry dependencies recursively and runs npm for missing packages.
Pin versions when a major would break APIs. DayPicker-style ranges are a good example: declare the major your source expects so consumers do not silently upgrade into a broken UI.
Semantic Token System
Style with tokens like bg-primary and text-foreground. Because these map to CSS custom properties backed by oklch values, dark mode is zero-effort once the theme sheet is in place.
Keep brand color decisions in the theme file, not scattered across components. Heights, radius, and spacing should follow the control scale so docs previews and installed apps stay visually aligned.
When you need a one-off surface, derive it from existing tokens with color-mix rather than inventing a new hex. That keeps contrast tooling and theme switches honest.
Responsive Layouts
Prefer logical layout utilities so grids and stacks adapt without physical left/right assumptions. Use ms/me, ps/pe, and start/end so RTL and LTR inherit direction from the document.
Keep control heights consistent across breakpoints. Responsive work should change width, stacking, and gutters — not shrink buttons below the default control height.
For sticky chrome like this chapter rail, make sure the reading column is tall enough that sticky has room to travel. Short demos make progress and active states flicker.
Accessibility by Default
Interactive components ship with correct ARIA attributes, keyboard navigation, and focus management. Overlays handle focus trapping and restore focus on close.
Reading chrome should expose progress to assistive tech with a real progressbar role and live values. Chapter links need clear labels and visible focus rings.
Test with keyboard only once per release. If you cannot reach every control and see where focus is, the page is not ready — no matter how polished the visual design looks.
Production Checklist
Before shipping: run typecheck, verify the production build, and test at 375px, 768px, and 1280px. Check light and dark modes and confirm focus rings stay visible on primary and muted surfaces.
Spot-check direction with both LTR and RTL providers. Directional icons should flip; brand marks and avatars should not. Sticky sidebars and progress bars must remain usable in both directions.
Finally, scroll this article end-to-end once. The chapter rail should settle on one active item at a time, the progress bar should climb smoothly, and nothing in the side chrome should jitter as sections pass the reading line.
Building production-ready UIs with SonoJS and Tailwind v4
Alex Rivera
June 23, 20268 min read
Introduction
Modern front-end development demands more than just getting things to work — it requires systems that scale, components that compose, and designs that adapt. SonoJS is built to satisfy all three.
Setting Up the Project
The fastest way to start is with the SonoJS CLI. Run npx @sonojs/ui@latest init and follow the prompts for your framework, theme tokens, and TypeScript setup.
Semantic Token System
Style with tokens like bg-primary and text-foreground. Because these map to CSS custom properties backed by oklch values, dark mode is zero-effort.
Responsive Layouts
Prefer logical layout utilities so grids and stacks adapt without physical left/right assumptions. Keep control heights consistent across breakpoints.
Accessibility by Default
Interactive components ship with correct ARIA attributes, keyboard navigation, and focus management. Overlays handle focus trapping.
Production Checklist
Before shipping: run typecheck, verify the build, and test at 375px, 768px, and 1280px. Check light and dark modes and visible focus rings.
8 min left
0%
Signal over noise
11 min left
Essay · Summer 2026
The quiet interface: designing for attention, not dopamine
A field note on slowing the scroll — progress as place, not a percentage shout.
01
Signal over noise
Most reading chrome shouts. Bars race across the top, docks claim the thumb zone, pills float like notifications. The reader never forgets they are being measured.
A quieter pattern treats progress as place. You always know where you are in the essay, but the chrome stays at the edge — a spine, not a banner.
02
The vertical spine
Progress should feel like place — a spine you can touch — not a timer racing the thumb.
Map each section to a tick on a tall rail along the inline end. As the reading line moves, ticks fill and the active chapter label updates. No competing sticky header.
Because the rail is logical (`end`), it mirrors correctly in RTL without rewriting layout math. The article column stays centered and calm.
03
Tempo and remaining time
Show remaining minutes only when it helps — mid-read, not at the first pixel. Round gently so the number does not jitter every scroll frame.
When the reader reaches the end, swap the HUD for a finished state. Completion should feel like closing a book, not clearing a quest.
04
Typography as the product
If the chrome is quiet, the type has to carry the experience. Generous leading, a clear dek, and section titles that earn their weight.
Pull quotes and short paragraphs give the spine room to breathe. Short demos make every tick fire at once — long copy is part of the interaction design.
05
Ship notes
Throttle scroll updates with requestAnimationFrame. Prefer a reading-line spy over noisy IntersectionObserver thresholds on short blocks.
Expose a real progressbar for assistive tech, keep focus rings on chapter ticks, and never trap scroll inside the demo unless the product truly uses a nested scroller.