farn-theme
v0.7.0
Published
A token-first CSS design system rooted in the forests of northern Germany — palette + semantic tokens, plus ready-to-use component classes
Maintainers
Readme
Farn
Sharp. Warm. Intellectual.
Farn is a zero-dependency, token-first CSS design system for projects that want a calm, intellectual aesthetic without a JavaScript framework. A single <link> gives you a two-layer token system — raw palette tokens plus semantic tokens for dark and light mode — and opt-in component classes (buttons, cards, forms, badges, breadcrumbs, accordion) and typography utilities built on top. Inspired by Nord Theme.
📖 Full documentation at farn.jbpt.de
Tokens, components, theming, live examples, and copy-paste Templates live on the docs site. This README is just enough to install and orient.
Install
npm / pnpm / yarn
npm install farn-theme@import "farn-theme"; /* full bundle: tokens + base reset */
@import "farn-theme/tokens"; /* tokens only — no reset */
@import "farn-theme/components"; /* opt-in component classes */
@import "farn-theme/typography"; /* opt-in typography utility classes */CDN (no build step)
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/jabopiti/[email protected]/dist/farn.css">Replace
0.7.0with the latest release tag, or pin it for stability.
Prevent a flash of the wrong theme by adding this before <body>:
<script>
(function() {
const stored = localStorage.getItem('farn-theme');
const system = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
document.documentElement.setAttribute('data-theme', stored ?? system);
})();
</script>Set data-theme="dark|light" for mode and data-surface="base|layer|overlay" for depth — see the Getting Started guide for the full setup.
Repo layout
For anyone forking or contributing:
tokens/— CSS source of truth. Edit here, neverdist/.dist/— built bundles (farn.css,farn-tokens.css,farn-components.css,farn-typography.css).site/— the Astro documentation site, itself built with Farn.
Build bundles after any tokens/ change with npm run build. Contributor conventions live in .agents/AGENTS.md; release history in CHANGELOG.md.
For AI assistants
The farn-styling skill applies Farn colors and typography to any visual output. If your AI assistant supports skills, you can use this to ensure visual consistency when generating UI artifacts.
A compact reference for AI-assisted coding is also available at llms.txt.
License
MIT — see LICENSE.
Design by Jacob Lueg Tiedemann.
