Hi everyone,
I often needed to display code snippets nicely in Bricks, so I built a small plugin called “Bricks Code Box” and thought I’d share it here in case it’s useful for anyone.
It adds a new “Code Box” element inside Bricks with:
– Syntax highlighting (via Prism.js)
– Copy-to-clipboard button (accessible, with feedback)
– Optional line numbers
– Light/Dark themes
– Optional filename/title with icon
– Collapsible mode
– Adjustable max height and wrapping
The plugin integrates cleanly into Bricks (own element category, grouped controls, accessibility-friendly).
Download / GitHub:
It also includes auto-updates via GitHub using the Plugin Update Checker library, so you’ll get updates directly from the repo.
Requires:
– WordPress ≥ 6.0
– Bricks ≥ 1.9.x
– PHP ≥ 7.4 (recommended 8.1+)
I built this with a bit of help from AI
— it was a quick weekend project, so please be kind if you find any rough edges!
Maybe something similar already exists, but I just wanted to share it in case it helps someone or gives others some ideas.
I’d really appreciate any feedback, improvements, or suggestions you might have.
(Screenshot attached)
Best regards,
Karl

