Project
ActiveCards hold any content you like.
A modern, framework-free component library. One stylesheet, no JavaScript, light and dark themes built in.
AthwinUI is a single CSS file. Pick whichever install method suits you.
Served by jsDelivr straight from the GitHub repo. Paste into your <head>:
@main. For stability, replace main with a release tag or commit hash, e.g. @v1.1.0.For projects with a bundler or build step (Vite, webpack, Next.js, Parcel…). Install the package:
npm i athwinuiThen import the stylesheet once, either in your CSS file:
@import "athwinui/athwin.css";or in your JavaScript entry point:
import "athwinui/athwin.css";Package page: npmjs.com/package/athwinui. To pin a version, use npm i athwinui@1.1.0.
Download athwin.css from the repo and link it relatively:
<link rel="stylesheet" href="./athwinui/athwin.css">Every class starts with aw-, so it never collides with your own CSS. Variants add a suffix: aw-btn-primary, aw-badge-success.
Styles live in @layer athwin.* (reset, theme, base, components, utilities). Your unlayered CSS always wins, no !important needed.
Colors, radii, shadows and fonts are CSS custom properties (--aw-*) you can override anywhere.
Containers, spacing primitives and text styles.
aw-container centers content up to --aw-container (1160px). aw-section adds responsive vertical padding.
Vertical flex column. Set spacing with --aw-gap (default 1rem).
Horizontal, wrapping row with vertical centering. Ideal for button groups and badges.
aw-grid uses --aw-cols equal columns (collapses to one column under 700px). aw-grid-auto fits as many columns as possible using --aw-min (default 220px).
Lead paragraph for introductions.
Body text with inline code and a link.
Muted text
Small subtle text
Note: aw-h1–aw-h3 and aw-display are classes, so you can apply them to any element (use the right tag for accessibility).
Actions, cards, badges and avatars.
Use aw-btn on <button> or <a>. Add one variant, optionally a size and shape.
aw-card with optional aw-card-header, aw-card-footer and aw-card-hover (lift on hover).
Cards hold any content you like.
aw-panel is a subtle inset box (used for callouts), and aw-surface sets the surface background color.
Put initials or an <img> inside. Sizes: aw-avatar-sm, default, aw-avatar-lg.
Wrap each control in aw-field with an aw-label and optional aw-hint.
The switch needs the hidden checkbox followed by aw-switch-track.
Tables, lists, stats, alerts, progress, loading states and overlays.
Wrap in aw-table-wrap for rounded borders and horizontal scrolling.
| Member | Status | Role |
|---|---|---|
| Jordan Davis | Active | Developer |
| Alex Kim | Pending | Designer |
Set progress with the --aw-progress variable. Add aw-progress-success for green.
Wrap aw-modal in aw-modal-backdrop (fixed, full-screen). Show or hide it with your own JS or the aw-hidden utility. Below is just the modal box:
This can't be undone.
Everything is driven by CSS custom properties on :root.
AthwinUI follows the system setting by default. Force a theme with data-aw-theme on <html>, or scope it with .aw-dark on any container.
Remember to override the dark-theme values too ([data-aw-theme="dark"]) if you use dark mode.
| Token | Purpose |
|---|
Small single-purpose helpers. Most use !important so they override component styles.
| Class | Effect |
|---|
Centered, constrained and truncated text that is far too long to fit on one line…
AthwinUI is open source on GitHub.