How to customize slide title #110
-
Hi, I want to redefine content for header, for example, replace text title to a link, like
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hi, you do not need to use the To customize the slide title, simply assign your jsx markup to the slide's <Lightbox
slides={[
{
src: "https://picsum.photos/id/237/1800/1200",
title: (
<a
href="https://picsum.photos"
target="_blank"
rel="noopener noreferrer"
>
Puppy
</a>
)
}
]}
open={open}
close={() => setOpen(false)}
plugins={[Captions]}
/> https://codesandbox.io/s/yet-another-react-lightbox-110-xdr1d8?file=/src/App.js |
Beta Was this translation helpful? Give feedback.
-
Thank you,bro, I try it , nice. |
Beta Was this translation helpful? Give feedback.
Hi, you do not need to use the
render.slideHeader
render function in this case since it's not related to the Captions plugin at all.To customize the slide title, simply assign your jsx markup to the slide's
title
attribute as follows:https://codesandbox.io/s/yet-another-react-lightbox-110-xdr1d8?file=/src/App.js