Skip to content
Data Display

Spoiler

client23.75 kB
@stellaria/nebula-webSpoilerProps

Preview

Props

8
PropTypeDefault

children

required
ReactNode

—

className

string

—

defaultExpanded

booleanfalse

expanded

boolean

—

hideLabel

ReactNode"Show less"

maxHeight

number100

onExpandedChange

((expanded: boolean) => void)

—

showLabel

ReactNode"Show more"

Slot props

2

Each one spreads over an inner element, so you can restyle a region without forking the component.

PropTypeDefault

contentProps

The clipped block. Its `max-height` is written AFTER the slot while it is closed, because that is what does the clipping; everything else can be adjusted.

BoxSlotProps

—

toggleProps

The link that opens and closes. Only rendered when the content overflows `maxHeight`.

AnchorSlotProps

—

Also accepts

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

Style props · 128