Theme documentation
Patterns
Use paper patterns on individual elements, or add a site-wide overlay across the viewport.
Set the interval
For element-level patterns, numeric suffixes set CSS pixels, not Tailwind spacing steps. For example, ninaero-paper-grid-8 draws an 8px grid without a separate base class. Decimals such as 12.5 work, with a 1px minimum. Omit the suffix for the defaults below. Dot sizes and stroke widths stay fixed.
- Notebook: 20 fine-line intervals per square cell. The 6px default gives 120px cells.
- Checker: the suffix sets the square size.
- Wide checker: the suffix sets height. Width is twice the height.
Patterns
Change sizes at breakpoints
Tailwind variants work on sizing and ink classes. Keep class names complete so Tailwind can detect them.
<div aria-hidden="true" className="ninaero-paper-grid-12 h-40 md:ninaero-paper-grid-32" />Set the ink color
For element-level patterns, ninaero-pattern-ink-* accepts semantic, palette, and arbitrary colors. Add /25 for 25% opacity. Ink affects only pattern marks. Set the fill with bg-*.
ninaero-paper-notebook-6 ninaero-pattern-ink-primary/25ninaero-paper-grid-16 ninaero-pattern-ink-slate-500/30ninaero-dither-8 ninaero-pattern-ink-[#5c7185]/35<div aria-hidden="true" className="ninaero-paper-notebook-6 ninaero-pattern-ink-primary/25 h-48 bg-muted" />Without an ink class, defaults stay neutral in both modes. Notebook and dither reserve ::before for the texture.
Diamond dither overlay
Illustration shading and retro or game artwork.
The transparent texture defaults to an 8px tile.
ninaero-dither-4ninaero-dither-8ninaero-dither-12<div aria-hidden="true" className="relative h-48 overflow-hidden rounded-lg bg-muted"> <div className="absolute inset-x-0 bottom-0 h-1/2 ninaero-dither-8 ninaero-pattern-ink-foreground/20" /></div>A static texture, not an image filter.
Add a site-wide overlay
A site-wide overlay adds a static texture behind page content and controls, including menus and dialogs. Overlays are off by default.
Keep body::after free for the overlay. Do not apply transforms to body.
To enable Checker, add ninaero-overlay-dither to body in your root layout.
Wrap the page content in a positioned layer above the texture. Keep the wrapper transparent; opaque controls and menus then cover the texture.
<body className="ninaero-overlay-dither"> <div className="relative z-[1]">{children}</div></body>Choose a texture
Keep ninaero-overlay-dither when you change textures. Add one modifier class:
- For Ordered dots, add
ninaero-overlay-dots. - For Diagonal lines, add
ninaero-overlay-lines. - For Flipnote dither, add
ninaero-overlay-flipnote.
<body className="ninaero-overlay-dither ninaero-overlay-flipnote"> <div className="relative z-[1]">{children}</div></body>Adjust the overlay
Keep the overlay classes on body when you use these CSS rules. Each example changes one setting.
To make the texture fainter, set --ninaero-overlay-opacity to 0.02.
body { --ninaero-overlay-opacity: 0.02;}For a 4px tile, set --ninaero-overlay-size to 4px.
body { --ninaero-overlay-size: 4px;}To compare the texture without color blending, set --ninaero-overlay-blend-mode to normal.
body { --ninaero-overlay-blend-mode: normal;}After any change, check text, focus rings, disabled controls, and error states in light and dark modes.
Disable the overlay
Remove ninaero-overlay-dither from body.
Site-wide overlay reference
Texture modifiers require ninaero-overlay-dither. The utilities and CSS custom properties have these defaults.
ninaero-overlay-ditherenables Checker with a 2px tile.ninaero-overlay-dotsselects Ordered dots with a 4px tile.ninaero-overlay-linesselects Diagonal lines with a 4px tile.ninaero-overlay-flipnoteselects Flipnote dither with an 8px sparse pixel-stipple tile.--ninaero-overlay-opacityaccepts values from 0 to 1. The default is 0.06.--ninaero-overlay-sizesets the tile width and height with a CSS length. Without an override, each texture uses its default tile size.--ninaero-overlay-blend-modedefaults tomultiplyin light mode andscreenin dark mode. Dialog and AlertDialog backdrops switch it to normal so their blur includes the texture.
Overlay ink uses the neutral foreground. The layer ignores pointer input and adds no keyboard stops. Print and forced-colors mode hide the overlay. The texture is static, not an image filter.
On this site, the Overlay menu in the header previews each texture. The demo retains your choice across navigation and resets to Checker on reload.
Readability and accessibility
- For element-level patterns, use one pattern per region. Keep dense content and controls on opaque backgrounds.
- Apply
aria-hiddenonly to decorative layers, not containers with meaningful content. - Forced-colors mode removes textures. Content must remain clear without them.