Image viewer
A picture over the whole window: it grows from where it was, zooms at the pointer, pans, and goes to the next or previous.
import { ImageViewer } from "@arcadia/ui"TSX
Examples
--image-viewer-measure- Ref<Measure>Default var(--thread-width)
- The column its words stand in. Default a conversation's.
- Left, Right
- The previous and the next picture
- Esc
- Closes the words opened, then the viewer
- 0
- The whole picture
- , -
- Closer and further, at the middle
- Enter, Space on the words
- Opens them whole
ImageViewer
imagesrequired- readonly T[]
- The pictures it goes through, in order.
indexrequired- number
- The one it opens on.
from- HTMLElement | nullDefault null
- The picture's place it grows from, and goes back into as it closes.
around- ViewerAround<T>
- The pictures before and after one: asked as it opens and as either end nears. Without it,
imagesare all. label- (image: T) => stringDefault (i) => i.name ?? "Image"
- Each picture's name for assistive technology. Default its own name, else "Image".
who- (image: T) => ReactNode
- The bar's start: who sent the picture shown and when.
caption- (image: T) => ReactNode
- The words under it, or null.
actions- (image: T) => readonly ViewerAction[]
- What can be done with it, in the bar before its own Close.
placeOf- (image: T) => HTMLElement | nullDefault from
- A picture's own place on the page, where closing puts it back and gives the focus. For the first.
onCloserequired- () => void
- It has gone, its closing finished: the product takes it away.
rootStyle- RootStyle<ImageViewerKnobs>
- Typed StyleX override:
--image-viewer-measure.