Skip to content
Foundation / Layout

Grid

server24.25 kB
@stellaria/nebula-webGridProps

Preview

Props

8
PropTypeDefault

children

ReactNode

—

className

Composes with the classes `Box` computes instead of replacing them.

string

—

columns

How many columns a full row spans. It is the unit `Grid.Col`'s `span` counts against, so changing it rescales every child at once.

number12

component

The element it paints.

(ElementType & C)"div"

grow

Lets the columns of the last row stretch to fill it instead of leaving a gap on the end. Only affects a row that did not fill up.

booleanfalse

gutter

Gap between columns and rows. Replaces `gap`, which `Grid` does not accept.

SpacingValue"md"

reveal

Animates the element in when it first scrolls into view. `true` takes the catalogue entrance; an object tunes it — `preset`, `distance`, `spring`, `duration`, `once`, `amount`, `rootMargin` and `index` for a stagger. It lives here rather than on each surface so that `Card`, `Paper`, `GradientBorder`, `Section` and anything else built on `Box` inherit one implementation. Without it `Box` stays a server component; with it the root swaps for a client shell and the children keep rendering on the server. The entrance is a CSS transition, not a JavaScript animation: it is the only motion in the catalogue that fires WHILE the user scrolls, and the compositor should own it.

boolean | UseRevealOptions

—

wrap

Wraps columns that do not fit onto the next row. Turn it off and they shrink instead, which is what you want for a row that must stay one line.

booleantrue

Parts

1
Grid.Col

Also accepts

On top of its own props, this component forwards these groups.

Style props · 125