--- layout: layouts/component.njk title: Popover description: Displays rich content in a portal, triggered by a button. toc: - label: Usage id: usage children: - label: Default id: usage-default - label: Jinja or Nunjucks id: usage-jinja --- {% from "macros/code_preview.njk" import code_preview %} {% from "macros/code_block.njk" import code_block %} {% from "components/popover.njk" import popover %} {% set code %} {% call popover( id="demo-popover", trigger="Open popover", trigger_attrs={"class": "btn-outline"}, content_attrs={"class": "w-80 p-4"} ) %}
Set the dimensions for the layer.
If you need to do more than what <select> allows (e.g. HTML options), you can use the code below which uses the Popover component. Make sure to include the hidden input with the name you want to use for that field.
If you use Jinja (or Nunjucks), you can use the popover() macro directly.
Set the dimensions for the layer.