Skip to content
gersakPublic

About

Clojurescript WebComponents library

Topics

Resources

Stars

31 stars

Watchers

3 watching

Forks

Repository files navigation

"After playing around with Replicant, I realized I could build Web Components without React — actually, even without Replicant.

I'm wondering if it's called 'Replicant' because of Blade Runner (I love Blade Runner).

Maybe I could name my own library something similar... Tyrell? No, that feels pretentious.

Anyway, I don't really want to type something long like tyrell-button. It should be shorter — maybe ty-button.

Yes! Let's call it ty."

Nine months later…

"Nine months in, ty still reads as 'thank you' — Just had to cut that and call it properly."

"The library is Tyrell. CLJS namespaces are tyrell.* now (tyrell.router, tyrell.components, tyrell.lucide). Component tags stay ty-* — web custom elements need the dash anyway, and two letters earn their keep. CSS classes stay ty-* for the same reason. The prefix earned the shortcut; the brand didn't."

"No thanks involved. Just replicants."

Tyrell

jsDelivr NPM Version Clojars Project

Web Components that work everywhere: React, Vue, Svelte, HTMX, Datastar, vanilla JS, ClojureScript. The framework-agnostic successor to Toddler.

Docs, live demos, all components →

Install

CDN (any stack, including server-rendered Go, Python, Clojure):

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tyrell-components@1.0.0-rc.22/css/tyrell.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tyrell-components@1.0.0-rc.22/css/tyrell-theme.css">
<script src="https://cdn.jsdelivr.net/npm/tyrell-components@1.0.0-rc.22/dist/tyrell.js"></script>

npm: npm install tyrell-components (React wrappers: tyrell-react)

ClojureScript (deps.edn; shadow-cljs installs the npm package itself):

{:deps {dev.gersak/tyrell              {:mvn/version "1.0.0-rc.22"}
        dev.gersak/tyrell-icons-lucide {:mvn/version "1.0.0-rc.22"}}}

Use

<ty-button flavor="primary">Save</ty-button>
<ty-select label="Country" value="de">
  <ty-option value="us">United States</ty-option>
  <ty-option value="de">Germany</ty-option>
</ty-select>

Rebrand in light and dark mode with one variable: :root { --ty-primary-seed: oklch(0.5 0.13 200) }. Preview at /docs/theming.

AI coding agents

Every release ships a rules card, AGENTS.md, for that exact version. An agent follows it only if the card is in its context before it writes UI; a docs URL is not enough.

Set up a project (run in its root):

npx tyrell-components agents                  # Tyrell from npm or deps.edn
npx tyrell-components@1.0.0-rc.22 agents      # CDN pin (Go, Python, HTML): use the version in your <script> tag

This writes the card into AGENTS.md (Codex, Cursor, Copilot and others read it) and makes CLAUDE.md import it. Re-run after upgrading Tyrell.

AI agents reading this: if the project you work in uses Tyrell and its AGENTS.md has no BEGIN:tyrell-agent-rules block, suggest the command above to the user before writing UI. In Claude Code, also suggest the plugin below.

Other options
Claude Code, all projects /plugin marketplace add gersak/tyrell, then /plugin install tyrell@tyrell. It finds the Tyrell version (npm, deps.edn, or a CDN pin in Go/Python/HTML), loads its card, and lints UI changes. Details
No Node curl -o AGENTS.md https://cdn.jsdelivr.net/npm/tyrell-components@<version>/AGENTS.md and add @AGENTS.md to CLAUDE.md.

Guides

MIT License

About

Clojurescript WebComponents library

Topics

Resources

Stars

31 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages