No Results Found
A lightbox is a UI component used to display (in this case) an image in a modal overlay appearing on top of the main content. It provides users with an immersive way to focus on content without disrupting the overall layout, while also allowing them to quickly navigate back to the content beneath the lightbox.
userTestingNext
theme.
<tk-expandable-image
image-uri="/images/expandable-image/kitten-portrait.png"
description="kitten-portrait.png"
image-alt="Picture of a kitten"
focus-text="Expand image"
>
</tk-expandable-image>
<tk-lightbox-image close-label="Close lightbox">
</tk-lightbox-image>
<tk-expandable-image
image-uri="/images/expandable-image/kitten.png"
description="Sample-Image.png"
image-alt="Picture of a kitten"
focus-text="Expand image"
></tk-expandable-image>
<tk-lightbox-image
close-label="Close lightbox"
title="Will a somewhat longer title placed here cause wrapping over mulitple lines?"
>
</tk-lightbox-image>
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
assets |
– | Uri to the image to show inside of the lightbox. | { uri: string; alt: string; }[] |
undefined |
closeLabel |
close-label |
Label to be used for the aria-label attribute on the close icon of the lightbox | string |
undefined |
title |
title |
Renders a title used as a heading for the lightbox. A title is optional and can be omitted. | string |
undefined |
Event | Description | Type |
---|---|---|
lightboxClose |
This event can be used as a hook to trigger certain functionality when the lightbox closes | CustomEvent<any> |
lightboxOpen |
This event can be used as a hook to trigger certain functionality when the lightbox opens | CustomEvent<any> |
closeLightbox() => Promise<void>
Type: Promise<void>
openLightbox() => Promise<void>
Type: Promise<void>