About
ranui — a Web Components UI library — plus ranuts utilities. Hand-built frontend infrastructure.
Web & App DevelopmentMeasured star growth
- in 24h
- -2
- in 7 days
- -1
- in 15 days
- -1
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original
ran
Web components for AI chat and product UI. One <r-*> tag works the same in React, Vue, Svelte or a plain HTML file.
Documentation · Components · Agents
English · 中文 · 日本語 · Español · Português · 한국어 · Deutsch · فارسی
By the numbers
| ranui | Shoelace | Web Awesome | Material Web | |
|---|---|---|---|---|
| One button, all dependencies and theme, gzip | 12.4 kB | 22.5 kB | 41.1 kB | 14.4 kB |
| 1,000 buttons created and rendered | 32 ms | 52 ms | 60 ms | 102 ms |
| ranui on its own | |
|---|---|
| A five-control form (button, input, checkbox, select, modal), gzip | 41.3 kB |
| Server render of 140 elements to Declarative Shadow DOM, Node | 1.5 ms |
| First styled paint, server-rendered vs client-only (Slow 4G, 4× CPU) | 424 ms vs 662 ms |
| ran.chaxus.com on Lighthouse mobile: score, LCP, CLS | 97, 2.5 s, 0 |
How these were measured
- Head-to-head: ranui 0.5.5, Shoelace 2.20.1, Web Awesome 3.14.0 (free), Material Web 2.5.0, each from npm. Size is the button entry bundled with
esbuild --bundle --minify --format=esm, plus the theme stylesheet each library's docs ask for (Material Web needs none), compressed withgzip -9. Web Awesome's and Shoelace's buttons pull in their icon and spinner components. Time is the median of 10 fresh pages: create 1,000 buttons, append them, wait one task so Lit-based components finish rendering, and read layout. - Form size: the five components imported together from a build of
main(3f54e43) and bundled with esbuild, counting every file the browser fetched. Imported one at a time they total 74.4 kB, because they share one runtime. - Server render:
renderHTMLToStringfromranui/ssr-streamon a page of 20 forms, median of 15 samples. The output is 947 kB of HTML (125 kB gzip), because each element carries its own styles. - First styled paint: the same 20-form page, gzip on, Chromium throttled to Slow 4G and a 4× slower CPU, median of 10 runs. Server-rendered, the styled form is in the first paint; client-only, it is styled once the components load. On upgrade the server-rendered page currently shifts by a CLS of 0.125.
- Lighthouse: Lighthouse 12.8 mobile preset, median of three runs. The button page scores the same (97, LCP 2.3 s, CLS 0).
ran has three parts, each usable on its own: ranui, UI components built as native custom elements; ranuts, typed TypeScript utilities; and Ran Design, methods for layout, interaction and review that people and coding agents can apply in any stack.
- Works with any framework, or none. Every component is an
<r-*>tag, so React, Vue, Svelte and a plain HTML file use it the same way. There is no adapter or framework runtime, and one script tag is enough. - Building blocks for AI chat interfaces. A conversation view that follows streaming output, Markdown that renders half-finished text, reasoning and tool-call rows, attachments and voice input.
ranuts/streamparses the streamed response. - Themes, server rendering and types included. Light and dark themes through design tokens, SSR helpers and TypeScript declarations ship with the package.
- Install only what you use. Each package and each component has its own entry point.
Packages
| Package | What it is for |
|---|---|
| ranui | Forms, dialogs, tables, Markdown, media players and AI chat views as custom elements, with themes and server-rendering helpers. |
| ranuts | Helpers for strings, color, time, files, storage and the DOM, plus SSE parsing and streamed-response state. |
| Ran Design | Methods for composition, interaction, motion and evidence-based review. Ships as an agent plugin and does not require ranui. |
ranui's builder and reactivity layer is published separately as @alixex/ranview.
Quick start
Without a build step, load a component from a CDN and write the tag:
<script src="https://cdn.jsdelivr.net/npm/ranui/dist/iife/button.iife.js" defer></script>
<r-button type="primary">Save</r-button>
With a bundler, install the package and import the components you use:
npm install ranui
import 'ranui/button';
import 'ranui/style';
ranui is in alpha and releases can include breaking changes, so pin an exact version in production. The component documentation has live examples, events and styling for every element.
Use with a coding agent
The ran plugin adds design, ranui and ranuts skills to Claude Code and Codex. It needs no MCP server or account.
claude plugin marketplace add chaxus/ran && claude plugin install ran@ran
codex plugin marketplace add chaxus/ran && codex plugin add ran@ran
In a new session, use /ran:design, /ran:ranui or /ran:ranuts in Claude Code, or $design, $ranui or $ranuts in Codex. To install from a local checkout instead, see the Agents guide; the skills themselves live in plugins/ran.
Contributing
Use Node 24+ and the pnpm version pinned in package.json.
pnpm install --frozen-lockfile
pnpm build
pnpm test
pnpm -F docs dev
Read AGENTS.md before contributing, and the release guide when preparing packages.
License
Explore related projects
Loading…