Lightbox
Image and media overlay viewer with navigation controls.
Generated from the package's public source.
API
Backdropcomponent
Backdrop(props: LightboxBackdropProps): Element
Props
class?stringstyle?string | CSSProperties
children: Element
CloseButtoncomponent
CloseButton(props: LightboxCloseButtonProps): Element
Props
class?string
children: Element
Contentcomponent
Content(props: LightboxContentProps): Element
Props
class?stringref?(el: HTMLDivElement) => voidstyle?string | CSSProperties
children: Element
Countercomponent
Counter(props: LightboxCounterProps): Element
Props
class?string
children: Element
Imagecomponent
Image(props: LightboxImageProps): Element
Props
class?stringstyle?string | CSSProperties
children: Element
LightboxBackdropPropsinterface
Props
class?stringstyle?string | CSSProperties
children: Element
LightboxCloseButtonPropsinterface
Props
class?string
children: Element
LightboxContentPropsinterface
Props
class?stringref?(el: HTMLDivElement) => voidstyle?string | CSSProperties
children: Element
LightboxCounterPropsinterface
Props
class?string
children: Element
LightboxImagePropsinterface
Props
class?stringstyle?string | CSSProperties
children: Element
LightboxIteminterface
Props
alt?stringsrcstring
LightboxNextButtonPropsinterface
Props
class?string
children: Element
LightboxPrevButtonPropsinterface
Props
class?string
children: Element
LightboxRootPropsinterface
Props
defaultIndex?number— Default starting index.defaultOpen?boolean— Default open state (uncontrolled).items?LightboxItem[]— Items to display in the lightbox.loop?boolean— Whether navigation loops.onOpenChange?(open: boolean, details: ChangeDetails<DisclosureReason>) => void— Called when open state change is requested.open?Accessor<boolean>— Controlled open state.
children: Element
NextButtoncomponent
NextButton(props: LightboxNextButtonProps): Element
Props
class?string
children: Element
PrevButtoncomponent
PrevButton(props: LightboxPrevButtonProps): Element
Props
class?string
children: Element
Rootcomponent
Root(props: LightboxRootProps): Element
Props
defaultIndex?number— Default starting index.defaultOpen?boolean— Default open state (uncontrolled).items?LightboxItem[]— Items to display in the lightbox.loop?boolean— Whether navigation loops.onOpenChange?(open: boolean, details: ChangeDetails<DisclosureReason>) => void— Called when open state change is requested.open?Accessor<boolean>— Controlled open state.
children: Element