QR Code
A styled QR code, drawn on the server as a crisp SVG: six dot styles, finder corners with their own shape and colour, solid or gradient fills, a circle shape, a rounded background and your logo in the middle. It encodes a web address or any text, typed in or from dynamic data.
QR Code is a Pro widget, part of the Pro plan.
Requires: no animation library and no JavaScript. The code is drawn in PHP; the only file the page loads is a small stylesheet that sizes it.
Where to find it#
Elements panel › Bricksify › QR Code. It is an element only: there is no control group on Bricks' own elements. See How widgets work.
Settings#
The panel has six groups. Every colour is a normal Bricks colour setting, so palette colours, global variables and per-breakpoint values work.
QR code
| Setting | Options and default | What it does |
|---|---|---|
| QR code data | Default: your site's home address. Dynamic data works, also inside query loops. | What the code encodes: a URL or any text. See the formats below. |
| Size | Default 200px. Any unit. | Width of the code; it is always square. It is never wider than its container, so it fits small screens by itself. Set a different size per breakpoint if you like. |
| Shape | Square (default), Circle | Circle surrounds the code with extra decorative dots to fill a disc. Pair it with a background Roundness of 100. |
| Quiet zone (modules) | Default 2. From 0 to 10. | Empty border around the code, measured in dots, so it scales with the code. Keep at least 1 unless the code sits on a plain light area. |
| Accessible label | Empty by default. Dynamic data works. | What screen readers announce. Left empty, a web address is read as "QR code linking to …" and anything else as "QR code". |
Dots
| Setting | Options and default | What it does |
|---|---|---|
| Dot style | Square (default), Dots, Rounded, Extra rounded, Classy, Classy rounded | The shape of the small dots that make up the code. |
| Fill | Solid (default), Linear gradient, Radial gradient | How the dots are painted. |
| Colour (gradient start) | Default black | The dot colour, or where the gradient starts. |
| Gradient end colour | Gradients only. Defaults to the start colour. | Where the gradient ends. |
| Gradient angle (deg) | Linear gradient only. Default 0. | 0 runs left to right, 90 top to bottom. |
Corners: the three big squares that tell a scanner where the code is, each an outer square with an inner dot. Left alone they follow the dots.
| Setting | Options and default | What it does |
|---|---|---|
| Outer square › Style | Square, Rounded square, Circle, or Made of dots in any of the dot styles except Square. Default Same as dots. | The shape of the outer squares. |
| Outer square › Fill | Solid, Linear gradient, Radial gradient. Default Same as dots. | Choose a fill to give the outer squares their own colour; the colour, gradient end and angle settings then appear, as for the dots. |
| Inner dot › Style | Square, Circle, or Made of dots in any of the dot styles except Square. Default Same as dots. | The shape of the inner dots. |
| Inner dot › Fill | Solid, Linear gradient, Radial gradient. Default Same as outer square. | Choose a fill to give the inner dots their own colour, with the same colour, gradient end and angle settings. |
Background
| Setting | Options and default | What it does |
|---|---|---|
| Fill | Solid (default), Linear gradient, Radial gradient, None (transparent) | How the area behind the code is painted. |
| Colour (gradient start), Gradient end colour, Gradient angle (deg) | Default white. The angle shows for a linear gradient only, default 0. | As for the dots. Dark dots on a light background scan best; light-on-dark codes are not read by every phone. |
| Roundness (%) | Default 0. Hidden when the fill is None. | 0 is a square, 100 a circle. |
Logo
| Setting | Options and default | What it does |
|---|---|---|
| Logo | Empty by default. An image from the media library, a URL or dynamic data; SVG works. | The picture in the middle of the code. The other logo settings appear once it is set. |
| Logo size | Default 0.4. From 0.1 to 1. | Share of the error-correction budget the logo may cover (1 = all of it). The code stays readable whatever you pick. For a bigger logo, raise Config › Error correction. |
| Padding (modules) | Default 0. From 0 to 5. | Space between the logo and the dots around it. |
| Keep dots behind the logo | Off by default, so the dots under the logo are left out. | Only for logos with a solid background of their own. |
Config
| Setting | Options and default | What it does |
|---|---|---|
| Error correction | Low (~7%), Medium (~15%), Quartile (~25%) (default), High (~30%) | How much of the code can be damaged, covered or hidden by a logo and still scan. Higher levels need more dots for the same data. |
| Mode | Auto (default), Byte, Numeric, Alphanumeric | Auto picks the most compact mode the data allows. Byte covers everything: URLs, vCards, Wi-Fi, accents, emoji. Numeric is digits only. Alphanumeric is digits, UPPERCASE letters, space and $%*+-./:, good for promo codes and tickets. If the data does not fit the mode you chose, Byte is used. |
What you can encode#
| For | Type in QR code data |
|---|---|
| A web page | https://example.com/ |
| A phone call | TEL:+39123456789 |
| A text message | SMSTO:+39123456789:Hello |
| An email | mailto:name@site.com?subject=Hi |
| A place on the map | geo:41.9028,12.4964 |
| A Wi-Fi login | WIFI:T:WPA;S:Network;P:password;; |
| A contact card | A vCard, starting BEGIN:VCARD |
| A calendar event | An event, starting BEGIN:VEVENT |
How it behaves#
- The code is drawn on the server when the page is built, so it shows in the builder as you type, and works inside query loops, AJAX-filtered results, components and popups.
- It is an SVG, so it is sharp at any size. It is 200px wide unless you set a Size, and never wider than its container.
- Tags in the data are removed before encoding, so what the scanner reads is plain text.
- With no data, or more data than one QR code can hold, the builder shows a message instead of a code. For too much data, shorten it or lower Config › Error correction.
- Screen readers announce it as an image with the Accessible label.
Reduced motion and without JavaScript#
Nothing moves and nothing runs in the browser, so every visitor sees the same code, with or without reduced motion and with or without JavaScript.
Like every widget placed as its own element, QR Code needs the plugin to render.