# AthwinUI > AthwinUI is a lightweight, framework-free CSS component library. One stylesheet, no JavaScript required, light and dark themes built in. All classes are prefixed `aw-`. Colors, radii, shadows and fonts are CSS custom properties (`--aw-*`). - Docs site: https://atherix.org/athwinui - Source: https://github.com/atherix-org/athwinui - License: GPL-3.0 ## Install Add this to the `` of any HTML page, then use `aw-*` classes: ```html ``` Via npm: `npm install athwinui`, then `import "athwinui/athwin.css"`. Minimal page: ```html

Hello

``` ## Rules for generating code - Use only classes listed below. Do not invent `aw-*` classes. - Variants are suffixes: `aw-btn aw-btn-primary`, `aw-badge aw-badge-success`. Always include the base class. - Wrap page content in `aw-container aw-section`. - Do not use Tailwind or Bootstrap classes alongside it. - Customize with CSS variables, not by editing the library: `:root { --aw-primary: #0ea5e9; }`. - Dark mode follows the system by default. Force with `` (or `"light"`), or scope with `class="aw-dark"`. - Styles live in cascade layers, so any unlayered CSS you write overrides them. ## Layout - `aw-container`: centered, max width `--aw-container` (1160px). `aw-section`: vertical padding. - `aw-stack`: vertical flex column; spacing via `style="--aw-gap:.5rem"`. - `aw-cluster`: wrapping horizontal row, vertically centered (button groups, badges). - `aw-grid`: equal columns via `--aw-cols` (e.g. `style="--aw-cols:3"`); one column under 700px. - `aw-grid-auto`: auto-fit columns, minimum width via `--aw-min` (default 220px). - `aw-between`: flex, space-between. `aw-center`: center both axes. `aw-divider`: `
` line. ## Typography `aw-eyebrow` (small uppercase label), `aw-display`, `aw-h1`, `aw-h2`, `aw-h3`, `aw-lead`, `aw-muted`, `aw-subtle`, `aw-small`. Inline `` and `` are styled by default. ## Buttons Base `aw-btn` on ` ``` ## Surfaces ```html ``` - `aw-panel`: subtle inset box. `aw-surface`: surface background. - Badges: `aw-badge` + optional `-primary | -success | -warning | -danger | -info`. - Avatars: `JD`; sizes `aw-avatar-sm`, `aw-avatar-lg`. ## Forms Wrap each control in `aw-field` with `aw-label` and optional `aw-hint`. ```html ``` - `aw-input` (add `aw-input-error` for invalid), `aw-textarea`, `aw-select`, `aw-range` (on ``). - ``; ``. - Switch: ``. ## Navigation and disclosure - `aw-nav`: row of links; current link gets `aria-current="page"`. - `aw-tabs`: links or buttons; active one has `aria-selected="true"` or `.is-active`. Panel switching needs your own JS. - `aw-breadcrumbs`: links, last item ``. - Dropdown (no JS): `
Menu
`. - Tooltip: ``. - `aw-kbd`: keyboard key chip. - Accordion (no JS): `
Q

A

`. ## Data and feedback - Table: `
…
`. - List: `
  • Item
`. - Stat: `
Label24,892
`. - Alerts: `aw-alert` + `-success | -info | -warning | -danger`; markup `
✓
TitleMessage
`. - Progress: `
`; add `aw-progress-success` for green. - Loading: `aw-spinner`, `aw-skeleton` (set width/height inline). - Toast: `aw-toast`. - Modal: `
`. Toggle visibility with your own JS or `aw-hidden`. ## Utilities `aw-hidden`, `aw-block`, `aw-inline`, `aw-flex`, `aw-flex-wrap`, `aw-items-center`, `aw-justify-between`, `aw-gap-1|2|3`, `aw-mt-1|2|3`, `aw-mb-1|2`, `aw-p-0`, `aw-w-full`, `aw-w-100`, `aw-max-w`, `aw-mx-auto`, `aw-text-center`, `aw-text-right`, `aw-rounded`, `aw-shadow`, `aw-truncate`. ## Design tokens `--aw-font`, `--aw-mono`, `--aw-bg`, `--aw-surface` (`-2`, `-3`), `--aw-text`, `--aw-muted`, `--aw-subtle`, `--aw-border`, `--aw-primary` (`-hover`, `-soft`), `--aw-on-primary`, `--aw-success|warning|danger|info` (each with `-soft`), `--aw-radius-*`, `--aw-pill`, `--aw-shadow-sm|shadow|shadow-lg`, `--aw-ring`, `--aw-container`, `--aw-transition`. Override tokens for dark mode too: `[data-aw-theme="dark"] { --aw-primary: …; }`. ## Optional - Full interactive docs with live previews: https://atherix.org/athwinui - Stylesheet source: https://github.com/atherix-org/athwinui/blob/main/athwin.css