Viewer
@stellaria/nebula-webViewerPropsPreview
Props
10| Prop | Type | Default |
|---|---|---|
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 requiredControlled: 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. | boolean | false |
Slot props
7Each one spreads over an inner element, so you can restyle a region without forking the component.
| Prop | Type | Default |
|---|---|---|
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.