🎨 Themes
9 built-in themes via data-theme on <html>. Click a card to switch the entire page theme.
Theme switcher
yellow
data-theme="yellow"
purple
data-theme="purple"
<!-- Set on <html> --> <html data-theme ="dark" > <html data-theme ="light" > <html data-theme ="red" > <html data-theme ="blue" > <html data-theme ="green" > <html data-theme ="cyan" > <html data-theme ="yellow" > <html data-theme ="pink" > <html data-theme ="purple" >
🎨 Design Tokens
CSS-переменные из _base.css — единый источник правды для всех
стилей. Меняй здесь — применяется везде.
Semantic colors
surface
--color-dark-secondary
--color-primary --color-accent --color-success --color-error --color-warning --color-muted --color-light --color-dark-secondary
Primary scale
100
200
300
400
500
600
700
800
900
--color-primary-100 … --color-primary-900
Neutral scale
50
100
200
300
400
500
600
700
800
900
--color-neutral-50 … --color-neutral-900
Font families
Aa Gg
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123
Aa Gg
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123
Aa Gg
const x = 42; fn() => { return true }
--font-sans : var(--font-inter) --font-heading : var(--font-poppins) --font-mono : var(--font-roboto-mono)
Font sizes
--fs-xs
The quick brown fox jumps
12px
--fs-sm
The quick brown fox jumps
14px
--fs-base
The quick brown fox jumps
16px
--fs-lg
The quick brown fox
18px
--fs-xl
The quick brown fox
20px
--fs-2xl
The quick brown
24px
--fs-3xl
The quick brown
30px
--fs-xs : 12px
--fs-sm : 14px
--fs-base : 16px --fs-lg : 18px
--fs-xl : 20px
--fs-2xl : 24px --fs-3xl : 30px --fs-4xl : 36px --fs-5xl : 48px --fs-hero : 96px (+ fluid: --fs-f-base, --fs-f-xl…)
Spacing scale
--space-1 : 4px --space-2 : 8px --space-3 : 12px --space-4 : 16px --space-6 : 24px --space-8 : 32px --space-10 : 40px --space-12 : 48px --space-16 : 64px
Border radius
--radius-none : 0px --radius-sm : 6px --radius-md : 12px --radius-lg : 20px --radius-xl : 30px --radius-2xl : 40px --radius-full : 9999px
Shadows
--shadow-sm --shadow-md --shadow-lg --shadow-primary --shadow-accent --shadow-glow
⚡ Variants
data-variant attribute from _native.css — applies semantic color to native elements without class names.
Button variants
Default Accent Success Warning Error Dark Light <button> Default </button> <button data-variant ="accent" > Accent </button> <button data-variant ="success" > Success </button> <button data-variant ="warning" > Warning </button> <button data-variant ="error" > Error </button> <button data-variant ="dark" > Dark </button> <button data-variant ="light" > Light </button>
Input variants
<input type ="text" placeholder ="Default" > <input type ="text" data-variant ="success" > <input type ="text" data-variant ="error" > <input type ="text" data-variant ="warning" >
Link variants
<a href ="#" > Default link </a> <a href ="#" data-variant ="accent" > Accent </a> <a href ="#" data-variant ="success" > Success </a> <a href ="#" data-variant ="warning" > Warning </a> <a href ="#" data-variant ="error" > Error </a> <a href ="#" data-variant ="dark" > Dark </a>
𝐓 Headings & Typography
Headings, paragraphs, blockquotes and text formatting from _native.css. No classes needed inside <article>.
Headings h1–h6
Heading 1 — The quick brown fox Heading 2 — jumps over Heading 3 — the lazy dog Heading 4 — Pack my box Heading 5 — with five dozen Heading 6 — liquor jugs <h1> Heading 1 </h1> <h2> Heading 2 </h2> <h3> Heading 3 </h3> <h4> Heading 4 </h4> <h5> Heading 5 </h5> <h6> Heading 6 </h6>
Paragraph & text styles
A regular paragraph with bold text , italic text , and small text . Mix them for bold italic combinations.
Use underline sparingly. Strikethrough for outdated
content. Highlighted text draws attention.
Design is not just what it looks like and feels like. Design
is how it works.
— Steve Jobs <p> A paragraph with
<strong> bold </strong> ,
<em> italic </em> . </p> <p><mark> Highlighted </mark> ,
<s> strikethrough </s> </p> <blockquote>
Quote text here.
<cite> — Author </cite> </blockquote>
🔗 Inline & Links
Inline semantic elements styled by _native.css: links, citations, definitions, abbreviations, and more.
Links
<a href ="#" > Regular link </a> <a href ="#" aria-current ="page" > Active link </a> <a href ="#" target ="_blank" > External ↗ </a>
Inline semantic elements
Cited work —
Inline quotation —
Definition term —
variable —
H2 O —
E = mc2
Deleted text —
Inserted text —
Highlighted text —
HTML
<cite> Cited work </cite> <q> Inline quotation </q> <dfn> Definition </dfn> <var> variable </var> H <sub> 2 </sub> O <del> Deleted </del> <ins> Inserted </ins> <mark> Highlighted </mark> <abbr title ="HyperText Markup Language" > HTML </abbr>
≡ Lists
Unordered, ordered, and nested lists styled by _native.css.
Unordered list
First item Second item with a link Third item
Nested item one Nested item two Fourth item <ul>
<li> First item </li>
<li> Second item </li>
<li> Third item
<ul>
<li> Nested item </li>
</ul>
</li> </ul>
Ordered list
Design the layout Write semantic HTML Apply classless CSS
Link the stylesheet Set data-theme Ship it <ol>
<li> Design the layout </li>
<li> Write semantic HTML </li>
<li> Apply classless CSS </li>
<li> Ship it </li> </ol>
⌨ Code
Inline code, keyboard shortcuts with <kbd>, and <pre> blocks styled by _native.css.
Inline code & kbd
Use const for block-scoped constants. Press Ctrl + Shift + I to open DevTools.
Run npm install then npm run dev to start the server.
<p> Use <code> const </code> for constants. </p> <p> Press <kbd> Ctrl </kbd> + <kbd> S </kbd> </p>
Pre block
function greet(name) {
return 'Hello, ' + name + '!';
}
console.log(greet('World')); <pre>
<code>
function greet(name) {
return 'Hello, ' + name + '!';
}
</code> </pre>
📊 Tables
Native <table> with thead, tbody, tfoot and caption — all styled by _native.css.
Full table with thead / tbody / tfoot
Team Members Name Role Location Status Alice Chen Lead Developer San Francisco Active Bob Kline Designer Berlin Active Carol Davis DevOps London Away Dan Park QA Engineer Seoul Active Total members 4
<table>
<caption> Team Members </caption>
<thead>
<tr><th> Name </th><th> Role </th><th> Status </th></tr>
</thead>
<tbody>
<tr><td> Alice </td><td> Developer </td><td> Active </td></tr>
</tbody>
<tfoot>
<tr><td colspan ="2" > Total </td><td> 2 </td></tr>
</tfoot> </table>
🎛 Controls
Native checkboxes, radio buttons, and switches (role="switch") styled by _native.css.
Checkbox
<label><input type ="checkbox" checked > Checked </label> <label><input type ="checkbox" > Unchecked </label> <label><input type ="checkbox" disabled > Disabled </label>
Radio buttons
<label><input type ="radio" name ="plan" checked > Option A </label> <label><input type ="radio" name ="plan" > Option B </label> <label><input type ="radio" name ="plan" > Option C </label>
Switch (role="switch")
<label>
<input type ="checkbox" role ="switch" checked >
Notifications enabled </label> <label>
<input type ="checkbox" role ="switch" >
Dark mode </label>
▣ Ready Cards
Copy-ready card patterns built from semantic <article>,
headings, lists and buttons. Useful for docs, landing pages and internal tools.
CTA card pair
Open source CSS Build docs and prototypes with zero component classes.
Drop in classless.css, write semantic HTML, and keep
markup readable enough to copy straight from docs.
Explore docs GitHub
Full njX UI Need more than classless? Use the full component kit.
Buttons, cards, sidebars, modals, animations and utilities
share the same theme tokens.
View npm Live docs
<article>
<span> Open source CSS </span>
<h3> Build docs and prototypes... </h3>
<p> Drop in classless.css and write semantic HTML. </p>
<p> <a href ="https://njxui.dev" > Explore docs </a></p> </article>
Feature cards
01 No classes required Native headings, paragraphs, lists, tables and forms get sensible defaults.
Read reference 02 Data variants Use attributes like data-variant="success" for meaningful states.
Open docs 03 Theme aware Switch every card with one data-theme attribute on the root.
Try themes <article>
<h3> No classes required </h3>
<p> Native elements get sensible defaults. </p>
<a href ="https://njxui.dev" > Open docs </a> </article>
Pricing cards
Classless $0 / MIT
Semantic HTML styling 9 themes Loading states Use CDN Full njX UI 25+ components
Buttons, cards and forms Sidebar and modals Animations and utilities Install package Playground Fork on CodePen
Copy ready cards Try theme switcher Remix without build tools Open demo <article>
<h3> Classless </h3>
<p> $0 / MIT </p>
<ul> ... </ul>
<button data-variant ="primary" > Use CDN </button> </article>
📄 Article
Semantic <article> structure with header, body content, and footer. The scoping element for _native.css styles.
Article with header / body / footer
This is the article body. It can contain paragraphs, images, lists, code, and any other semantic HTML elements — all styled automatically.
A second paragraph with strong emphasis and italic text to demonstrate the base typography rhythm.
<article>
<header>
<h2> Article Title </h2>
<p> Published <time datetime ="2025-04-27" > April 27, 2025 </time></p>
</header>
<p> Article body content. </p>
<footer>
<p> Written by <a href ="#" > Author </a></p>
</footer> </article>
🏗 Semantic Elements
aside, address, and ARIA live region roles — role="alert", role="status", role="note".
aside
Main content goes here. It can contain any text.
Tip: Use aside for supplementary content that is related but not essential to the main flow.
<p> Main content here. </p> <aside>
<strong> Tip: </strong> Supplementary content. </aside>
ARIA roles: alert / status / note
Alert: Your session will expire in 5 minutes.
Status: File upload complete (3 of 3).
Note: Changes are saved automatically.
<p role ="alert" > Alert: Session expiring. </p> <p role ="status" > Status: Upload complete. </p> <p role ="note" > Note: Auto-saved. </p>
🖼 DL & Figure
Definition lists (dl/dt/dd) and figure with figcaption styled by _native.css.
Definition list
HTML HyperText Markup Language — the standard language for web pages. CSS Cascading Style Sheets — describes the presentation of HTML documents. JavaScript A scripting language for interactive web content. <dl>
<dt> HTML </dt>
<dd> HyperText Markup Language. </dd>
<dt> CSS </dt>
<dd> Cascading Style Sheets. </dd> </dl>
Figure with figcaption
Figure 1 — A scenic landscape from Picsum Photos. <figure>
<img src ="image.jpg" alt ="Description" >
<figcaption> Figure 1 — Caption text. </figcaption> </figure>
🔽 Details & Summary
Native <details> / <summary> accordion
— no JavaScript, styled by _native.css.
Details accordion
What is classless CSS?
A single CSS file that styles native HTML elements with
zero class names. Drop it in and write semantic HTML —
everything looks great out of the box.
How do I use data-theme?
Add data-theme="dark" (or any of the 9 theme
names) to your <html> element. Themes update
all CSS custom properties automatically.
Is this production ready?
Yes. The library is minified to ~48 KB, has zero runtime
dependencies, and supports all modern browsers. The
classless mode is a standalone add-on to the main CSS.
<details>
<summary> Question title </summary>
<p> Answer content goes here. </p> </details> <!-- Open by default --> <details open >
<summary> Always visible </summary>
<p> This panel is open on load. </p> </details>
▮ Progress & Meter
Native <progress>, <meter>, and <output> elements styled by _native.css.
Progress bar
Upload progress
Almost done
Indeterminate
<label> Upload progress
<progress value ="40" max ="100" ></progress> </label> <label> Indeterminate
<progress></progress> </label>
Meter
Disk usage (60%)
Battery (90%)
Score (low — 1/10)
<meter value ="0.6" min ="0" max ="1" low ="0.25" high ="0.75" ></meter>
Output
<form oninput ="result.value = parseInt(a.value) + parseInt(b.value)" >
<label> A: <input type ="range" id ="a" ></label>
<label> B: <input type ="number" id ="b" ></label>
<output name ="result" for ="a b" > 80 </output> </form>
💬 Dialog
Native
<dialog> element styled by
_native.css. Uses the
Popover API for zero-JS open/close.
Dialog via Popover API
Open dialog Dialog Title This is a native <dialog> using the Popover API — no JavaScript required to open or close.
<button popovertarget ="my-dialog" > Open dialog </button> <dialog id ="my-dialog" popover >
<h3> Dialog Title </h3>
<p> Dialog content goes here. </p>
<footer>
<button popovertarget ="my-dialog" popovertargetaction ="hide" > Close </button>
<button data-variant ="success" popovertarget ="my-dialog" popovertargetaction ="hide" > Confirm </button>
</footer> </dialog>
⏳ Loading
aria-busy="true" on any block element adds a frosted overlay
+ spinning indicator from _native.css. Use [role="status"] for an inline spinner. No extra markup needed.
aria-busy on article
Project analytics Loading content…
View report Export
<article aria-busy ="true" >
<h3> Project analytics </h3>
<p> Loading content… </p>
<button> View report </button> </article>
aria-busy on section
Account settings Section loading…
<section aria-busy ="true" >
<p> Section loading… </p> </section>
Button loading state
<button aria-busy ="true" > Saving… </button> <button aria-busy ="true" data-variant ="accent" > Submitting… </button>
Inline spinner — data-loading
Fetching data…
Syncing changes
<p> <span data-loading ></span> Fetching data… </p>