IzzyBlazor.Lightbox in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.31 assembly
and its doc comments.
Properties (10)
Labelstring requiredWhat the pictures are, such as "Product photos": the viewer's accessible name. Required.
@bind-Indexint?The item open in the viewer, from 0; null when the viewer is closed. With @bind-Index it follows what a person opens, moves to and closes, on an interactive page.
Counterbool = falseShows the open item's place, such as "2 of 5".
Arrowsbool = trueShows the previous and next buttons. Defaults to true.
TransitionLightboxTransition = LightboxTransition.NoneHow one image gives way to the next: LightboxTransition.None, the default, shows it at once; LightboxTransition.Fade fades it in.
Loopbool = falseWraps from the last image to the first, and back.
CloseOnBackdropbool = trueCloses the viewer on a click outside the image and its controls. Defaults to true.
HideControlsAfterTimeSpan = TimeSpan.FromMilliseconds(3000)How long without a pointer move or a key before the viewer's controls fade. Defaults to 3 seconds; TimeSpan.Zero keeps them.
ChildContentRenderFragment?The LightboxItems, laid out as you like.
Events (0)
No events.
Parts (1)
Components written inside Lightbox, documented here with it.
LightboxItem
One picture of a Lightbox: a link to the image, drawn as a small picture of it (or as its content). A click opens the image in the lightbox's viewer. It's a real link, so opening it in a new tab or copying its address works as for any link.
Srcstring requiredThe full-size image's URL: what the viewer shows, and where the link goes.
Altstring? requiredWhat the image shows, for screen readers and when it fails to load, such as "The deal pipeline, five columns of cards". Required.
Captionstring?A caption under the image in the viewer.
Thumbnailstring? (computed)A smaller image for the link and the viewer's thumbnails. Defaults to Src.
DarkSrcstring?The image to show in its place where the color scheme is dark, such as a screenshot taken in dark mode.
DarkThumbnailstring? (computed)A smaller image for the dark scheme. Defaults to DarkSrc.
ChildContentRenderFragment?The link's content, in place of the small picture: a card, a button, any markup. Name what it opens in it, since the link takes its name from this content.
Plus 17 item props and 4 common props.
Types (2)
LightboxTransition
enumHow one image of a Lightbox gives way to the next.
| Value | Description |
|---|---|
None | The next image shows at once, with no animation (the default). |
Fade | The next image fades in. |