# neobrutalistcomponents v1.3.0 — full reference
> Brutalist React components. Core and study themes, light and dark, one token contract.
This file is generated from the library’s metadata and example sources; it describes the code exactly.
## Install
```sh
npm install neobrutalistcomponents
```
## Setup
```tsx
import { NeoProvider, Button } from 'neobrutalistcomponents';
import 'neobrutalistcomponents/styles.css';
import 'neobrutalistcomponents/themes/classic.css';
import 'neobrutalistcomponents/themes/classic.fonts.css'; // optional: loads the theme's fonts
export function App() {
return (
);
}
```
`NeoProvider` props: `theme` (built-in id or your own), `mode` ('light' | 'dark' | 'system'; omit for the theme's native scheme), `as` ('div' | 'main' | 'section' | 'article' | 'span'). `useTheme()` returns `{ theme, mode }`.
The library never loads fonts by itself. Import neobrutalistcomponents/themes/.fonts.css for a one-line Google Fonts load, or self-host the families listed for each theme.
## Themes
| Theme | Tagline | Native scheme | Fonts | Best for | Avoid for |
| --- | --- | --- | --- | --- | --- |
| `classic` | This decision is final. | light | Bricolage Grotesque, Geist Mono | Product UIs, SaaS dashboards and marketing pages that should feel confident. The default choice. | Contexts that need to whisper (medical, legal) — use swiss. |
| `tech` | Terminal sophistication. | dark | Martian Mono, Geist Mono | Developer tools, infrastructure consoles, monitoring, anything that lives next to a terminal. Dark by default. | Consumer audiences who do not read monospace comfortably. |
| `swiss` | Precision, not plainness. | light | Inter Tight, JetBrains Mono | Dense admin, finance, analytics, documentation and editorial work where the content has to lead. | Playful brands — it is deliberately quiet. |
| `y2k` | Holographic trading-card energy. | light | Sixtyfour, M PLUS Rounded 1c, VT323 | Playful consumer apps, creative tools, events, fan sites, games. | Data-dense tables and long forms. |
| `riso` | Two inks, slightly off. | light | Archivo, IBM Plex Mono | Editorial sites, portfolios, newsletters, indie products and culture projects. | Long transactional forms and dense data. |
## Study themes
Each study theme reads one documented work; its page (https://sssamuelll.github.io/neobrutalistcomponents/#/en/atlas) cites the sources. Same token contract and geometry as the core themes: import its stylesheet, and its fonts file unless you self-host the fonts (system-font themes ship an empty one). The catalog is also data: `import { STUDY_CATALOG } from 'neobrutalistcomponents/study'`.
| Theme | Reference | Scene | Native scheme | Fonts | Stylesheets |
| --- | --- | --- | --- | --- | --- |
| `bauhaus-dessau` | Bauhaus Building, Dessau (Bauhausgebäude Dessau), Walter Gropius, Dessau, Germany, 1925–1926 | Germany | light | Jost | `themes/bauhaus-dessau.css`, `themes/bauhaus-dessau.fonts.css` |
| `din-1451` | DIN 1451, the German standard lettering (DIN-Schrift), Ludwig Goller, Germany, 1931–1936 | Germany | light | Barlow, Barlow Condensed | `themes/din-1451.css`, `themes/din-1451.fonts.css` |
| `maeusebunker` | Mäusebunker (former Central Animal Laboratories of the Free University of Berlin; Zentrale Tierlaboratorien der Freien Universität Berlin), Gerd Hänska, Magdalena Hänska, Kurt Schmersow, Lichterfelde, Berlin, Germany, 1971–1982 | Germany | dark | Barlow, Barlow Condensed, DM Mono | `themes/maeusebunker.css`, `themes/maeusebunker.fonts.css` |
| `munich-72` | Visual design of the 1972 Munich Olympic Games (Visuelles Erscheinungsbild der Olympischen Spiele München 1972), Otl Aicher, Gerhard Joksch, Munich, Germany, 1966–1972 | Germany | light | Inter | `themes/munich-72.css`, `themes/munich-72.fonts.css` |
| `carlton` | Carlton room divider, Ettore Sottsass, Milan, Italy, 1981 | Italy | light | system fonts | `themes/carlton.css`, `themes/carlton.fonts.css` |
| `lettera-22` | Olivetti Lettera 22 portable typewriter, Marcello Nizzoli, Giuseppe Beccio, Ivrea, Italy, 1950 | Italy | light | Cutive Mono | `themes/lettera-22.css`, `themes/lettera-22.fonts.css` |
| `dragon-quest` | Dragon Quest (Famicom; ドラゴンクエスト), Yuji Horii, Koichi Nakamura, Akira Toriyama, Koichi Sugiyama, Japan, 1986 | Japan | dark | DotGothic16 | `themes/dragon-quest.css`, `themes/dragon-quest.fonts.css` |
| `nakagin` | Nakagin Capsule Tower (中銀カプセルタワービル), Kisho Kurokawa, Ginza, Tokyo, Japan, 1970–1972 | Japan | light | Zen Kaku Gothic New, Dela Gothic One, M PLUS 1 Code | `themes/nakagin.css`, `themes/nakagin.fonts.css` |
| `super-mario-bros` | Super Mario Bros. (Famicom; スーパーマリオブラザーズ), Shigeru Miyamoto, Japan, 1985 | Japan | light | DotGothic16, Press Start 2P | `themes/super-mario-bros.css`, `themes/super-mario-bros.fonts.css` |
| `tokyo-1964` | Poster for the Tokyo 1964 Olympic Games, Yusaku Kamekura, Tokyo, Japan, 1961 | Japan | light | Noto Sans, Anton | `themes/tokyo-1964.css`, `themes/tokyo-1964.fonts.css` |
| `caracas-signage` | Signage and graphic identity of the Caracas metro (Metro de Caracas), Max Pedemonte, BMPT, Caracas, Venezuela, 1983 | Latin America | light | Arimo | `themes/caracas-signage.css`, `themes/caracas-signage.fonts.css` |
| `create-two-three-many-vietnams` | Create two, three… many Vietnams (OSPAAAL poster), Alfredo Rostgaard, Cuba, 1967 | Latin America | light | Barlow, Barlow Condensed | `themes/create-two-three-many-vietnams.css`, `themes/create-two-three-many-vietnams.fonts.css` |
| `loteria` | Mexican lotería (the Don Clemente deck), Clemente Jacques, Mexico, 1887 | Latin America | light | Noto Sans, Libre Franklin | `themes/loteria.css`, `themes/loteria.fonts.css` |
| `sesc-pompeia` | SESC Pompéia (Centro de Lazer Fábrica da Pompéia), Lina Bo Bardi, André Vainer, Marcelo Carvalho Ferraz, Pompeia, São Paulo, Brazil, 1977–1986 | Latin America | light | Chivo, Chivo Mono | `themes/sesc-pompeia.css`, `themes/sesc-pompeia.fonts.css` |
| `amiga-os` | Amiga Workbench 1.3, Commodore-Amiga, RJ Mical, United States, 1988 | United States | light | Workbench, DM Mono | `themes/amiga-os.css`, `themes/amiga-os.fonts.css` |
| `aqua` | Mac OS X (Aqua interface), Apple Computer, Cupertino, United States, 2000 | United States | light | Open Sans | `themes/aqua.css`, `themes/aqua.fonts.css` |
| `atari-gem` | The GEM desktop on the Atari ST (TOS 1.0), Digital Research, United States, 1985 | United States | light | VT323 | `themes/atari-gem.css`, `themes/atari-gem.fonts.css` |
| `beos` | BeOS 5, Be Inc., Menlo Park, California, United States, 2000 | United States | light | Arimo | `themes/beos.css`, `themes/beos.fonts.css` |
| `classifieds` | craigslist (classified-ads website), Craig Newmark, San Francisco, United States, 1995 | United States | light | system fonts | `themes/classifieds.css`, `themes/classifieds.fonts.css` |
| `iphone-os` | iPhone OS 1 (the original iPhone’s interface), Apple Inc., Cupertino, United States, 2007 | United States | light | Arimo | `themes/iphone-os.css`, `themes/iphone-os.fonts.css` |
| `mac-os-classic` | Mac OS System 7 (graphical user interface), Apple Computer, Cupertino, United States, 1991 | United States | light | Arimo, Pixelify Sans | `themes/mac-os-classic.css`, `themes/mac-os-classic.fonts.css` |
| `material-design` | Material Design (version 1), Google, Mountain View, United States, 2014 | United States | light | Roboto | `themes/material-design.css`, `themes/material-design.fonts.css` |
| `nextstep` | NeXTSTEP, NeXT Computer, Keith Ohlfs, California, United States, 1989 | United States | light | Arimo | `themes/nextstep.css`, `themes/nextstep.fonts.css` |
| `palm-os` | Palm OS on the Pilot 1000, Palm Computing, Rob Haitani, United States, 1996 | United States | light | Tiny5, Pixelify Sans | `themes/palm-os.css`, `themes/palm-os.fonts.css` |
| `whaam` | Whaam!, Roy Lichtenstein, New York, United States, 1963 | United States | light | Comic Neue, Bangers | `themes/whaam.css`, `themes/whaam.fonts.css` |
| `win-xp` | Windows XP (Luna visual style), Microsoft, Redmond, United States, 2001 | United States | light | Noto Sans, Libre Franklin | `themes/win-xp.css`, `themes/win-xp.fonts.css` |
| `win31` | Windows 3.1, Microsoft, United States, 1992 | United States | light | Jersey 10 | `themes/win31.css`, `themes/win31.fonts.css` |
| `win95` | Windows 95 (graphical user interface), Microsoft, Redmond, United States, 1995 | United States | light | DotGothic16 | `themes/win95.css`, `themes/win95.fonts.css` |
| `xerox-star` | Xerox Star (8010 Information System), David Canfield Smith, Charles Irby, Ralph Kimball, Bill Verplank, Eric Harslem, El Segundo and Palo Alto, United States, 1981 | United States | light | system fonts | `themes/xerox-star.css`, `themes/xerox-star.fonts.css` |
## Composition rules
- Wrap the app — or each themed island — in one NeoProvider. Never hard-code colors, fonts, borders or shadows: custom CSS reads the same var(--nbc-*) tokens.
- Space with the token scale only: --nbc-space-xs/sm/md/lg/xl/2xl/3xl = 4/8/12/16/24/32/48px.
- Controls that sit in one row share one size; Button, Input, Select and Textarea of the same size have the same height in every theme (32 / 40 / 48px).
- One primary Button per region (card footer, dialog, form), placed last. Cancel is ghost or secondary.
- Every form control has a visible label. Error messages say how to fix the problem.
- Inline status → Badge. Block-level message → Alert. Destructive action → danger Button behind a Dialog confirmation.
- Group with Card, never nest cards. Lay out pages with your own CSS grid/flex using the spacing tokens.
- Icons: any 24px stroke set (the docs use lucide-react). Button and Input size icons for you.
- Override with plain CSS — the library lives in cascade layers, so unlayered CSS always wins. Never use !important.
- Pick one theme per product. Use mode="system" in apps; leave mode unset for the theme’s native scheme.
## Token contract
Every built-in theme defines every token below, in light and dark. Custom CSS should read these instead of literal values.
- **Typography:** `--nbc-font-sans`, `--nbc-font-display`, `--nbc-font-mono`, `--nbc-weight-body`, `--nbc-weight-label`, `--nbc-weight-display`, `--nbc-label-transform`, `--nbc-label-spacing`, `--nbc-display-transform`, `--nbc-display-spacing`
- **Color (solid; #hex or light-dark(#hex, #hex)):** `--nbc-bg`, `--nbc-fg`, `--nbc-fg-muted`, `--nbc-surface`, `--nbc-surface-alt`, `--nbc-border-color`, `--nbc-primary`, `--nbc-primary-fg`, `--nbc-accent`, `--nbc-accent-fg`, `--nbc-info`, `--nbc-info-fg`, `--nbc-success`, `--nbc-success-fg`, `--nbc-warning`, `--nbc-warning-fg`, `--nbc-danger`, `--nbc-danger-fg`, `--nbc-focus`
- **Fills (backgrounds; may be gradients):** `--nbc-primary-fill`, `--nbc-danger-fill`, `--nbc-surface-fill`, `--nbc-texture`
- **Shape:** `--nbc-border-width`, `--nbc-border-style`, `--nbc-radius`, `--nbc-radius-control`, `--nbc-radius-button`, `--nbc-radius-small`
- **Elevation and interaction:** `--nbc-shadow`, `--nbc-shadow-lg`, `--nbc-shadow-press`, `--nbc-press`, `--nbc-press-active`, `--nbc-rotate`, `--nbc-focus-width`, `--nbc-focus-offset`
- **Motion:** `--nbc-duration`, `--nbc-duration-slow`, `--nbc-ease`
- **Invariant (never themed):** `--nbc-space-xs`, `--nbc-space-sm`, `--nbc-space-md`, `--nbc-space-lg`, `--nbc-space-xl`, `--nbc-space-2xl`, `--nbc-space-3xl`, `--nbc-fs-xs`, `--nbc-fs-sm`, `--nbc-fs-md`, `--nbc-fs-lg`, `--nbc-fs-xl`, `--nbc-fs-2xl`, `--nbc-fs-3xl`, `--nbc-fs-4xl`, `--nbc-control-h-sm`, `--nbc-control-h-md`, `--nbc-control-h-lg`
## Bring your own theme
```css
/* my-theme.css — load it after styles.css */
@layer nbc.tokens, nbc.theme, nbc.base, nbc.components, nbc.flourish;
@layer nbc.theme {
[data-theme="acme"] {
--nbc-scheme: light;
--nbc-font-sans: 'IBM Plex Sans', system-ui, sans-serif;
--nbc-bg: light-dark(#f6f6f4, #121212);
--nbc-fg: light-dark(#121212, #f6f6f4);
--nbc-surface: light-dark(#ffffff, #1c1c1c);
--nbc-border-color: light-dark(#121212, #f6f6f4);
--nbc-primary: #ff5c00;
--nbc-primary-fg: #121212;
--nbc-radius: 6px;
--nbc-shadow: 4px 4px 0 var(--nbc-border-color);
/* every token you leave out falls back to the neutral default */
}
}
```
## Components
### Button
A pressable slab that performs an action: four variants, three sizes on the shared control scale, a loading state and icon slots.
Extends `ComponentProps<'button'>` — every native prop is forwarded.
**Use it for**
- Trigger an action in place: save, submit a form, open a dialog, delete something.
- A link that must read as an action (pricing CTA, "Get started") — wrap the link with asChild.
**Do not use it for**
- Navigation inside running text — use a plain link.
- Turning a setting on or off — use Switch.
- Picking one option out of several — use RadioGroup, Select or Tabs.
**Props**
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `'primary' \| 'secondary' \| 'danger' \| 'ghost'` | `'primary'` | Visual weight. primary = the one main action; secondary = alternatives; danger = destructive; ghost = low-emphasis (cancel, toolbar). |
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Height 32 / 40 / 48px — identical to Input, Select and Textarea of the same size, in every theme. |
| `loading` | `boolean` | `false` | Shows the theme spinner in place of the icons, sets aria-busy and disables the button. The label stays, so the width does not jump. |
| `fullWidth` | `boolean` | `false` | Stretch to the width of the container. |
| `leftIcon` | `ReactNode` | — | Icon before the label. Rendered at 1.15em and hidden from assistive tech. |
| `rightIcon` | `ReactNode` | — | Icon after the label. Rendered at 1.15em and hidden from assistive tech. |
| `asChild` | `boolean` | `false` | Render the single child element (an , a router Link) with the button classes and inner structure instead of a