Skip to content
Rich Content

Viewer

client48 kB
@stellaria/nebula-webViewerProps

Preview

Props

10
PropTypeDefault

actions

Actions on the piece in view, in the top bar beside the close button.

ReactNode

—

caption

A line beside the counter: whose the piece is, what state it is in.

ReactNode

—

className

string

—

images

required
readonly ViewerImage[]

—

index

required

Controlled: whoever opens the viewer knows the piece and arms `actions` for it.

number

—

labels

Partial<ViewerLabels>

—

onClose

required
() => void

—

onIndexChange

required
(index: number) => void

—

opened

required
boolean

—

withDownload

A real `<a download>` for the piece in view. Nothing else in the catalogue saves a file.

booleanfalse

Slot props

7

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

PropTypeDefault

barProps

The top bar.

BoxSlotProps

—

counterProps

The counter pill.

TextSlotProps

—

imageProps

Every piece image.

Omit<DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref">

—

stageProps

The stage the pieces slide on. It carries the pointer gestures.

BoxSlotProps

—

stripProps

The thumbnail strip. Only with more than one image.

BoxSlotProps

—

thumbImageProps

The image of each thumbnail.

Omit<DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref">

—

thumbProps

Every thumbnail button; the current one carries `aria-current`.

Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">

—

Also accepts

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

Style props · 128