Feedback
Popover
A floating panel with any content, opened from a trigger by a tk:dropdown or a tk:context: a filter form, a color palette, a short preview. It is the panel behind tk:menu; use tk:menu for a list of actions and tk:popover for everything else.
Nothing to show
A white panel with a border, rounded corners and a shadow, opened under the button and aligned to its end. It grows from the corner nearest the button. With keep-open it stays open while the user works inside it; a click outside or Escape closes it.
Without keep-open #
A row of buttons; any click inside, as on one of them, runs it and closes the panel, as a menu would.
Nothing to show
A color palette #
A data-driven panel: each swatch sets a Livewire property and closes the popover.
Nothing to show
Position #
position and align are set on the tk:dropdown around the popover.
Nothing to show
Sizes #
size sets the font size, padding, minimum width and maximum height, from xs to 3xl.
Nothing to show
Customization #
Classes go to the visible panel; the panel scrolls past the maximum height of its size, which a max-h-* class changes. container: reaches the outer popover element.
- Order #1042
- Order #1041
- Order #1040
- Order #1039
- Order #1038
- Order #1037
- Order #1036
- Order #1035
- Order #1034
- Order #1033
- Order #1032
- Order #1031
Nothing to show
Reference
tk:popover
| Prop | Type | Default | Description |
|---|---|---|---|
keepOpen |
bool | false |
Keeps the panel open on clicks inside it. |
size |
string | md |
xs, sm, md, lg, xl, 2xl or 3xl. Sets the font size, padding, minimum width and maximum height. |
animation |
string | scale | How the panel appears. See Dropdown, which passes it down. |
position and align are set on the tk:dropdown around it.
Slots
| Slot | Description |
|---|---|
| default | The panel content. |
Prefixes
| Prefix | Goes to |
|---|---|
container: |
The popover element that holds the panel. |
Customization
Classes and attributes on the tag go to the visible panel. The outer element, in the browser's top layer, takes the container: prefix.
Nothing to show
The panel scrolls when its content is taller than the maximum height for its size; max-h-* on the tag changes it.
Accessibility
A native popover element: the trigger gets aria-controls and aria-expanded from the dropdown, plus aria-haspopup when the panel holds a menu, listbox or dialog. Opened by a click or the keyboard, the focus moves into the panel, to the first option, item or tab it finds, or to the panel itself; a menu opened by a mouse click, or a text field used as the trigger, keeps the focus on the trigger. Escape closes it and returns the focus to the trigger, and Tab out of it closes it too.
Behavior notes
- The panel is in the browser's top layer, so
overflow: hiddenandz-indexof its parents do not clip or cover it, and it follows the trigger on scroll and resize, flipping to the other side when there is no room. data-keep-openon one element inside the panel keeps it open for clicks on that element only.- The panel has
wire:ignore.self: a Livewire update keeps it open. - A panel inside a
tk:modalcloses when the modal closes, also when the modal is closed by code.