Code
@stellaria/nebula-webCodePropsPreview
Props
5| Prop | Type | Default |
|---|---|---|
block Turns the run of code into a `pre` block: line breaks and indentation survive, and long lines scroll sideways instead of wrapping. An explicit `component` overrides the tag but keeps the block styling. Nothing here highlights syntax — that is `CodeHighlight`. | boolean | false |
children | ReactNode | — |
className Composes with the classes `Box` computes instead of replacing them. | string | — |
component The element it paints. Left alone it follows `block`, so setting it by hand is how you keep the block styling on a different tag — and how you lose the whitespace preservation that only `pre` gives you. | (ElementType & C) | "code" |
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 | — |
Also accepts
On top of its own props, this component forwards these groups.