Popovers let you add information that, on a button click, pops over the primary content.
Basic useĀ¶
Create a popover using the :::pop[]
container directive.
-
The text in square brackets is the popover target. In this example, the target is
tgt1
. -
The text between the colons is the popover content. In this example, the content is
Ello, poppet!
Popovers work by scanning a post from top to bottom in search of each popover target and replacing the target with a button that reveals the corresponding popover content.
For example, a post with Markdown like this...
would be rendered like this...
I like milk
IconsĀ¶
By default, popovers use
circle-plus
circle-x
You can modify the default icons by providing Lucide icon ids for the openIcon
and closeIcon
properties of the :::pop
directive.
Bears hibernate for up to 100 days
Duplicate TargetsĀ¶
We suggest using a unique name for each of your popover targets so that you'll never have to worry about duplicate targets that "compete" for content. But for the curious...
Consider this example Markdown
The first (1)
will render "AAA" and the second (1)
will render "BBB". This is a direct consequence of the logic used for rendering popovers, which works more or less like this š