Pop Out Panel for Bricks
Pop Out Panel is a nestable element. A square button in a corner of the screen opens a panel that holds any Bricks elements, such as a contact form.
Version: 0.1.0 · Requires: Bricks Builder, WordPress 6.5+ and PHP 8.1+ · See the live demo
Please note: this is an early release. It has been run on this playground but not yet tested widely, so stage & back up before using it on a live site.
Using it
- Add Pop Out Panel and put your content inside it.
- Set a header title (or leave it empty for none), the corner and the width.
- Choose how it opens: from the button, automatically, or from links.
Controls
- Panel: title, corner, distance from the edges, width, maximum height and how it shows in the builder.
- Launcher button: icon (a speech bubble by default), optional text, accessible name, or hide it.
- Opening: automatically after a delay and/or after scrolling a percentage of the page; remember a close for a number of days; open from any link to
#your-anchor; close on a click outside. - Style: panel and header colours, border, shadow, padding, button colours, size and typography.
Accessibility
The panel is a role="dialog" that is inert while closed. The button carries aria-expanded and aria-controls. Escape closes the panel and focus returns to the button. Opening one panel closes any other.
Limitations
- Without JavaScript the panel stays hidden, so also link to a contact page.
- A remembered close is stored in the visitor’s browser only.
Scripting
POP.open(element) and POP.close(element) take the element’s root node.
Changelog
- 0.1.0 — first release.