Docs / Using arts
Sizing and backgrounds
The art fills its box
An art draws into whatever size its box has on the page and redraws when that size changes. It uses the screen's pixel density, so dots stay sharp on high-resolution displays.
Dots get denser in small boxes
In a box 360 px or larger on its shorter side, dots stay spacing pixels apart: a bigger box shows more dots, and the drawing scales so it fits the shorter side.
Below 360 px the dots are drawn closer together, down to 3 px apart, so a small art keeps its shape. The library's previews and the code your assistant adds both work this way, so an art looks the same in both at the same size. Without this, a 48 px loader had room for only six dots across, and Chase Ring's three chasing dots shrank to one dot each. Wide, short boxes are held to about the dot count of an art page, so a thin strip stays cheap to draw. To keep the spacing fixed, set autoSpacing={false} on the React component, or change "autoSpacing":true to false in the HTML snippet's options.
Smallest sizes
An art needs about 96 px on its shorter side (32 dots at the densest spacing). Below that it loses detail. As widths for each fit's shape:
| Fit | Smallest width |
|---|---|
| Icon | 96 px |
| Card | 154 px |
| Banner | 250 px |
| Background | 171 px |
A loader inside a button smaller than 96 px will look like a rough ring or blob. For a tiny spinner, pick a simple art such as Hop Trio, or give the loader its own 96 px space.
Light pages
When an art has no background of its own, the faint grid takes its colour from the page behind it: faint white on a dark page, faint black on a light one. It follows the page when the theme switches. Set grid: false to drop it.
Fits
Each art is drawn for one of four shapes, and keeps that shape unless you ask otherwise.
| Fit | Shape | Good for |
|---|---|---|
| Icon | 1:1 | Buttons, loaders, status |
| Card | 16:10 | A card or a feature block |
| Banner | 13:5 | A strip or a header |
| Background | 16:9 | Any area behind content |
Arts work at other shapes too; they just have more or less space around them.
Full-area backgrounds
Ask your assistant for it in plain words: "put Warp Stars behind the hero section, filling it, with the text on top". Background arts (Plasma, Warp Stars, Breathing Grid and the rest of Backgrounds) fill any size. A larger spacing keeps a big background calm and cheap to draw.