<ol><li>Design the layout</li><li>Write semantic HTML</li><li>Apply classless CSS
<ol><li>Link the stylesheet</li><li>Set data-theme</li></ol></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.
Inline code & kbd
<p>
Use <code>const</code> for block-scoped constants. Press <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>I</kbd> to open DevTools.
</p><p>
Run <code>npm install</code> then <code>npm run dev</code> to start the server.
</p>
Pre block
function greet(name) {
return 'Hello, ' + name + '!';
}
console.log(greet('World'));
Native form elements styled by _native.css — label, input, select, textarea, fieldset.
Label + input
Label + input
<form><label>Full name <inputtype="text"placeholder="Jane Doe"></label><label>Email <inputtype="email"placeholder="jane@example.com"></label><label>Password <inputtype="password"placeholder="••••••••"></label></form>
Select & textarea
Select & textarea
<label>Country
<select><option>Choose a country</option><option>United States</option></select></label><label>Message
<textarearows="4"placeholder="Write your message..."></textarea></label>
Fieldset & legend
Fieldset & legend
<form><fieldset><legend>Personal Info</legend><label>First name <inputtype="text"></label><label>Last name <inputtype="text"></label></fieldset><fieldset><legend>Preferences</legend><label><inputtype="checkbox"> Subscribe</label></fieldset><buttontype="submit">Submit</button></form>
Ready form cards
Newsletter signup
Get classless.css examples, release notes and new ready blocks.
Contact form
Login card
Validation states
Ready form cards
<article><h3>Newsletter signup</h3><p>Get classless.css examples and release notes.</p><form><label>Email <inputtype="email"placeholder="you@example.com"></label><label><inputtype="checkbox"checked> Send updates</label><buttontype="button"data-variant="primary">Subscribe</button></form></article>
🎛 Controls
Native checkboxes, radio buttons, and switches (role="switch") styled by _native.css.
<article><span>Open source CSS</span><h3>Build docs and prototypes with zero component classes.</h3><p>Drop in classless.css and write semantic HTML.</p><p><ahref="https://njxui.dev">Explore docs</a><ahref="https://github.com/njbSaab/njx-css-ui">GitHub</a></p></article>
Feature cards
01
No classes required
Native headings, paragraphs, lists, tables and forms get sensible defaults.
Semantic <article> structure with header, body content, and footer. The scoping element for _native.css styles.
Article with header / body / footer
Article Title
Published · 5 min read
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 with header / body / footer
<article><header><h2>Article Title</h2><p>Published <timedatetime="2025-04-27">April 27, 2025</time> · 5 min read</p></header><p>This is the article body. It can contain paragraphs, images, lists, code, and any other semantic HTML elements — all styled automatically.</p><p>A second paragraph with <strong>strong emphasis</strong> and <em>italic text</em> to demonstrate the base typography rhythm.</p><footer><p>Written by <ahref="#">Author Name</a> · <ahref="#">Feedback</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.
aside
<p>Main content here.</p><aside><strong>Tip:</strong> Use aside for supplementary content.
</aside>
<figure><imgsrc="image.jpg"alt="Description"><figcaption>Figure 1 — Caption text here.</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 accordion
<details><summary>Question title</summary><p>Answer content goes here.</p></details><!-- Open by default --><detailsopen><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.
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.