Skip to content
Foundation / Layout

Space

server23.25 kB
@stellaria/nebula-webSpaceProps

Preview

Props

6
PropTypeDefault

children

ReactNode

—

className

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

string

—

component

The element it paints.

(ElementType & C)"div"

h

Vertical gap. Reach for it when the gap belongs to one spot and not to the layout — a container with `gap` says the rhythm once and does not leave empty nodes in the DOM.

SpacingValue

—

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

—

w

Horizontal gap. Only useful between inline or flex siblings; a block box already fills its row.

SpacingValue

—

Also accepts

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

Style props · 126