Skip to content
Typography

Code

server20 kB
@stellaria/nebula-webCodeProps

Preview

Props

4
PropTypeDefault

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`.

booleanfalse

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"

Also accepts

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

Style props · 128