Code to Bricks — Complete Reference
The Code to Bricks converter is a deterministic, server-side engine that parses HTML, CSS, and
JavaScript into native Bricks Builder elements. It uses PHP's DOMDocument parser
and requires zero API calls — meaning zero cost and instant results.
Key Facts
- Zero API cost — runs entirely on your server
- 80+ CSS properties mapped to Bricks GUI controls
- 30+ HTML tags mapped to native Bricks elements
- Framework detection — Tailwind CSS, Bootstrap, Automatic.css (ACSS)
- BEM classes auto-generated for clean, maintainable output
- Unmapped CSS automatically preserved in
_cssCustom
How It Works
The converter processes your code through a 6-step pipeline:
Embedded <style> blocks and inline style="" attributes are extracted from the HTML.
CSS classes are analyzed to detect Tailwind, Bootstrap, or ACSS — enabling smarter class-to-style mapping.
The HTML is parsed with DOMDocument into a tree. Each HTML tag is mapped to a Bricks element type using the Element Mapper.
CSS properties (both inline and from stylesheets) are mapped to Bricks GUI settings by the CSS Property Mapper. Anything unmappable goes into _cssCustom.
Auto-generated BEM-style class names (e.g. bais-block-1__heading) are applied for clean, predictable markup.
Any JavaScript or remaining CSS is wrapped into Bricks Code elements with executeCode: true.
HTML Tag Mapping
Every HTML tag is mapped to a specific Bricks element type. The mapper also uses contextual logic — for example,
an <a> with child elements becomes a block (to preserve structure), while a text-only
<a> becomes a button.
Layout & Structural
| HTML Tag | Bricks Element | Notes |
|---|---|---|
<section> | section | Top-level layout wrapper |
<div> | block | Generic container |
<header> | block | Semantic → block |
<footer> | block | Semantic → block |
<main> | block | Semantic → block |
<article> | block | Semantic → block |
<aside> | block | Semantic → block |
<span> | block | Inline → block |
<figure> | block | Figure wrapper |
<nav> | nav-nested / nav-menu | Simple <ul> child → nav-menu, otherwise nav-nested |
Headings
| HTML Tag | Bricks Element | Notes |
|---|---|---|
<h1> – <h6> | heading | Tag level preserved in settings.tag |
<legend> | heading | Form legend → heading |
<summary> | heading | Accordion trigger |
Text & Inline
| HTML Tag | Bricks Element | Notes |
|---|---|---|
<p> | text-basic | Paragraph text |
<strong>, <em>, <small> | text-basic | Emphasis → text |
<mark>, <abbr>, <cite> | text-basic | Inline semantic tags |
<label>, <figcaption>, <address> | text-basic | Misc text elements |
<blockquote> | text | Rich text (inner HTML preserved as content) |
Links & Buttons
| HTML Tag | Bricks Element | Notes |
|---|---|---|
<a> (text only) | button | Link URL → settings.link |
<a> (with child elements) | block | Structure preserved, link applied to wrapper |
<a> (single <img> child) | image | Image with link |
<button> | button | Native button |
Media
| HTML Tag | Bricks Element | Notes |
|---|---|---|
<img> | image | src, alt, srcset extracted |
<picture> | image | Treated as image |
<video> | video | autoplay, controls, loop, muted, poster extracted |
<audio> | audio | Media attributes extracted |
<svg> | svg | Full SVG markup preserved in settings.code |
<iframe> (YouTube/Vimeo) | video | Video provider auto-detected from URL |
<iframe> (Google Maps) | map | Map embeds detected from URL |
<iframe> (other) | html | Generic iframe preserved as HTML |
Lists
| HTML Tag | Bricks Element | Notes |
|---|---|---|
<ul>, <ol> | list | Bricks list element |
<li> | block | List item → block |
<dl> | block | Definition list container |
Interactive
| HTML Tag | Bricks Element | Notes |
|---|---|---|
<details> | accordion-nested | Summary text extracted as label |
<dialog> | offcanvas | Modal/dialog → offcanvas |
<progress> | progress-bar | Value/max → percentage |
Code & Preformatted
| HTML Tag | Bricks Element | Notes |
|---|---|---|
<code>, <pre> | code | Code elements |
<samp>, <kbd>, <var> | code | Code-related semantic tags |
Tables & Forms
| HTML Tag | Bricks Element | Notes |
|---|---|---|
<table> and all children | html | Entire table preserved as raw HTML in settings.code |
<form> | block | Form wrapper, child inputs extracted into fields array |
<input>, <textarea>, <select> | html | Preserved as raw HTML with attributes extracted |
<fieldset> | block | Fieldset → block |
Other
| HTML Tag | Bricks Element | Notes |
|---|---|---|
<hr> | divider | Horizontal rule → divider |
<iframe>, <embed>, <object> | html | Embeds preserved as raw HTML |
| Any unknown tag | block | Fallback for unmapped tags |
CSS Property Mapping
The CSS Property Mapper converts 80+ CSS properties into Bricks Builder GUI settings.
Both inline styles (style="") and CSS from <style> blocks are processed.
Properties that can't be mapped to GUI controls are automatically placed into _cssCustom using
the %root% selector.
Spacing (Padding & Margin)
Shorthand values are fully parsed. A single value applies to all sides; two values split into vertical/horizontal; three values set top/horizontal/bottom; four values map to top/right/bottom/left.
| CSS Property | Bricks Setting | Example |
|---|---|---|
padding |
_padding |
padding: 20px 40px; →{ _padding: { top: "20px", right: "40px", bottom: "20px", left: "40px" } }
|
padding-top |
_padding.top |
padding-top: 3rem; → { _padding: { top: "3rem" } } |
margin |
_margin |
margin: 10px 20px 30px 40px; →{ _margin: { top: "10px", right: "20px", bottom: "30px", left: "40px" } }
|
margin-bottom |
_margin.bottom |
margin-bottom: 2em; → { _margin: { bottom: "2em" } } |
Typography
All standard typography properties map directly into Bricks' _typography settings group. Colors are stored as raw values.
| CSS Property | Bricks Setting | Example |
|---|---|---|
color |
_typography.color.raw |
color: #6C5CE7; → { _typography: { color: { raw: "#6C5CE7" } } } |
font-size |
_typography.font-size |
font-size: 18px; → { _typography: { "font-size": "18px" } } |
font-weight |
_typography.font-weight |
font-weight: 700; → { _typography: { "font-weight": "700" } } |
font-family |
_typography.font-family |
font-family: "Inter", sans-serif; → { _typography: { "font-family": "Inter" } } |
font-style |
_typography.font-style |
font-style: italic; → { _typography: { "font-style": "italic" } } |
line-height |
_typography.line-height |
line-height: 1.6; → { _typography: { "line-height": "1.6" } } |
text-align |
_typography.text-align |
text-align: center; → { _typography: { "text-align": "center" } } |
text-transform |
_typography.text-transform |
text-transform: uppercase; → { _typography: { "text-transform": "uppercase" } } |
text-decoration |
_typography.text-decoration |
text-decoration: underline; → { _typography: { "text-decoration": "underline" } } |
letter-spacing |
_typography.letter-spacing |
letter-spacing: 0.05em; → { _typography: { "letter-spacing": "0.05em" } } |
word-spacing |
_typography.word-spacing |
word-spacing: 2px; → { _typography: { "word-spacing": "2px" } } |
Background & Gradients
Background colors map to _background.color. Background images (including CSS gradients) are parsed and mapped to Bricks' gradient settings with full color stop extraction.
| CSS Property | Bricks Setting | Example |
|---|---|---|
background-color |
_background.color.raw |
background-color: #1a1a2e; → { _background: { color: { raw: "#1a1a2e" } } } |
background-image (URL) |
_background.image.url |
background-image: url('hero.jpg'); → { _background: { image: { url: "hero.jpg" } } } |
background-image (gradient) |
_gradient |
background-image: linear-gradient(135deg, #6C5CE7, #a29bfe); →{ _gradient: { type: "linear", angle: "135", stops: [{ color: "#6C5CE7" }, { color: "#a29bfe" }] } }
|
background-size |
_background.image.size |
background-size: cover; → { _background: { image: { size: "cover" } } } |
background-position |
_background.image.position |
background-position: center top; → { _background: { image: { position: "center top" } } } |
background-repeat |
_background.image.repeat |
background-repeat: no-repeat; → { _background: { image: { repeat: "no-repeat" } } } |
background-attachment |
_background.image.attachment |
background-attachment: fixed; → { _background: { image: { attachment: "fixed" } } } |
linear-gradient, radial-gradient,
and conic-gradient. Angle, direction, and color stops with positions are all parsed.
Border & Border Radius
Border shorthand (1px solid #000) is parsed into width, style, and color. Individual sides and border-radius are fully supported with shorthand expansion.
| CSS Property | Bricks Setting | Example |
|---|---|---|
border |
_border.{width, style, color} |
border: 2px solid #6C5CE7; →{ _border: { width: { top: "2px", right: "2px", bottom: "2px", left: "2px" }, style: "solid", color: { raw: "#6C5CE7" } } }
|
border-top |
_border.width.top |
border-top: 1px solid #ccc; → { _border: { width: { top: "1px" }, style: "solid", color: { raw: "#ccc" } } } |
border-radius |
_border.radius |
border-radius: 12px; →{ _border: { radius: { top: "12px", right: "12px", bottom: "12px", left: "12px" } } }
|
border-top-left-radius |
_border.radius.top |
border-top-left-radius: 16px; → { _border: { radius: { top: "16px" } } } |
border-style |
_border.style |
border-style: dashed; → { _border: { style: "dashed" } } |
border-color |
_border.color.raw |
border-color: rgba(255,255,255,0.1); → { _border: { color: { raw: "rgba(255,255,255,0.1)" } } } |
Box Shadow
Box shadows are parsed into offset, blur, spread, color, and inset. The inset keyword is detected automatically.
| CSS Property | Bricks Setting | Example |
|---|---|---|
box-shadow |
_boxShadow |
box-shadow: 0 10px 30px rgba(0,0,0,0.15); →{ _boxShadow: { values: { offsetX: "0", offsetY: "10px", blur: "30px", spread: "0px" }, color: { rgb: "rgba(0,0,0,0.15)" }, inset: false } }
|
box-shadow (inset) |
_boxShadow |
box-shadow: inset 0 2px 4px rgba(0,0,0,0.1); →{ _boxShadow: { values: { offsetX: "0", offsetY: "2px", blur: "4px", spread: "0px" }, color: { rgb: "rgba(0,0,0,0.1)" }, inset: true } }
|
Flexbox
Flexbox properties map to Bricks' _flexbox group. This is the primary layout method in Bricks Builder.
| CSS Property | Bricks Setting | Example |
|---|---|---|
display: flex |
_display |
display: flex; → { _display: "flex" } |
flex-direction |
_flexbox.direction |
flex-direction: column; → { _flexbox: { direction: "column" } } |
justify-content |
_flexbox.justifyContent |
justify-content: space-between; → { _flexbox: { justifyContent: "space-between" } } |
align-items |
_flexbox.alignItems |
align-items: center; → { _flexbox: { alignItems: "center" } } |
align-self |
_alignSelf |
align-self: flex-end; → { _alignSelf: "flex-end" } |
align-content |
_flexbox.alignContent |
align-content: stretch; → { _flexbox: { alignContent: "stretch" } } |
flex-wrap |
_flexbox.wrap |
flex-wrap: wrap; → { _flexbox: { wrap: "wrap" } } |
flex-grow |
_flexGrow |
flex-grow: 1; → { _flexGrow: "1" } |
flex-shrink |
_flexShrink |
flex-shrink: 0; → { _flexShrink: "0" } |
flex-basis |
_cssCustom |
flex-basis: 300px; → { _cssCustom: "%root% { flex-basis: 300px; }" } |
gap |
_flexbox.gap |
gap: 24px; → { _flexbox: { gap: "24px" } } |
order |
_order |
order: 2; → { _order: "2" } |
Grid
Since Bricks primarily uses flex-based layouts, CSS Grid properties are mapped to _cssCustom using the %root% selector.
| CSS Property | Bricks Setting | Example |
|---|---|---|
grid-template-columns |
_cssCustom |
grid-template-columns: repeat(3, 1fr); →{ _cssCustom: "%root% { display: grid; grid-template-columns: repeat(3, 1fr); }" } |
grid-template-rows |
_cssCustom |
grid-template-rows: auto 1fr; → { _cssCustom: "%root% { grid-template-rows: auto 1fr; }" } |
grid-column |
_cssCustom |
grid-column: 1 / 3; → { _cssCustom: "%root% { grid-column: 1 / 3; }" } |
grid-row |
_cssCustom |
grid-row: span 2; → { _cssCustom: "%root% { grid-row: span 2; }" } |
Dimensions
| CSS Property | Bricks Setting | Example |
|---|---|---|
width | _width | width: 100%; → { _width: "100%" } |
max-width | _maxWidth | max-width: 1200px; → { _maxWidth: "1200px" } |
min-width | _minWidth | min-width: 300px; → { _minWidth: "300px" } |
height | _height | height: 100vh; → { _height: "100vh" } |
max-height | _maxHeight | max-height: 600px; → { _maxHeight: "600px" } |
min-height | _minHeight | min-height: 50vh; → { _minHeight: "50vh" } |
Position
| CSS Property | Bricks Setting | Example |
|---|---|---|
position | _position | position: absolute; → { _position: "absolute" } |
top | _top | top: 0; → { _top: "0" } |
right | _right | right: 20px; → { _right: "20px" } |
bottom | _bottom | bottom: 0; → { _bottom: "0" } |
left | _left | left: 50%; → { _left: "50%" } |
z-index | _zIndex | z-index: 100; → { _zIndex: "100" } |
Transform
Common transform functions are parsed individually. Complex transforms (e.g. matrix(), translate3d()) fall back to _cssCustom.
| CSS Input | Bricks Setting |
|---|---|
transform: rotate(45deg); |
{ _transform: { rotate: "45deg" } } |
transform: scale(1.1); |
{ _transform: { scale: "1.1" } } |
transform: translateX(-50%) translateY(-50%); |
{ _transform: { translateX: "-50%", translateY: "-50%" } } |
transform: translate(10px, 20px); |
{ _transform: { translateX: "10px", translateY: "20px" } } |
transform: skew(10deg, 5deg); |
{ _transform: { skewX: "10deg", skewY: "5deg" } } |
transform: rotateX(30deg) rotateY(45deg); |
{ _transform: { rotateX: "30deg", rotateY: "45deg" } } |
Transition
| CSS Input | Bricks Setting |
|---|---|
transition: all 0.3s ease; |
{ _transition: { property: "all", duration: "0.3s", timing: "ease", delay: "0s" } } |
transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s; |
{ _transition: { property: "transform", duration: "0.5s", timing: "cubic-bezier(0.4,", delay: "0," } } |
cubic-bezier and multi-value transitions may not parse perfectly due to the space-based splitting. For precise transitions, use _cssCustom.
CSS Filters
Individual filter functions are parsed into Bricks' _cssFilters settings. backdrop-filter goes to _cssCustom.
| CSS Input | Bricks Setting |
|---|---|
filter: blur(4px); |
{ _cssFilters: { blur: "4px" } } |
filter: brightness(1.2) contrast(0.9); |
{ _cssFilters: { brightness: "1.2", contrast: "0.9" } } |
filter: grayscale(100%) sepia(20%); |
{ _cssFilters: { grayscale: "100%", sepia: "20%" } } |
filter: hue-rotate(90deg) saturate(1.5); |
{ _cssFilters: { "hue-rotate": "90deg", saturate: "1.5" } } |
backdrop-filter: blur(10px); |
{ _cssCustom: "%root% { backdrop-filter: blur(10px); }" } |
Other Properties → _cssCustom
| CSS Property | Bricks Setting |
|---|---|
opacity | _opacity |
overflow | _overflow |
overflow-x, overflow-y | _cssCustom |
visibility | _cssCustom |
cursor | _cssCustom |
pointer-events | _cssCustom |
object-fit | _objectFit |
object-position | _cssCustom |
list-style, list-style-type | _cssCustom |
Class-Based Detection
Beyond tag mapping, the converter inspects CSS class names to detect the intended component type.
If a <div> has a class containing accordion, it becomes an accordion-nested
element even though a plain <div> would normally be a Bricks block.
| CSS Class Pattern | Bricks Element |
|---|---|
accordion | accordion-nested |
tabs | tabs-nested |
slider, carousel, swiper, splide | slider-nested |
modal, popup, offcanvas, drawer | offcanvas |
dropdown | dropdown |
alert | alert |
icon-box | icon-box |
counter, stat, count, number | counter |
countdown | countdown |
pricing | pricing-tables |
testimonial | testimonials |
team | team-members |
progress | progress-bar |
breadcrumb | breadcrumbs |
gallery | image-gallery |
logo | logo |
social | social-icons |
divider | divider |
search | search |
str_contains.
So my-accordion-wrapper, AccordionPanel, and faq-accordion
all match the accordion pattern.
Framework Detection
The converter automatically detects CSS frameworks by analyzing class names in your HTML. A confidence score is calculated for each framework. The primary framework with confidence above 30% is used for enhanced mapping.
Tailwind CSS Detection
Classes matching these patterns are recognized as Tailwind:
- Responsive prefixes:
sm:,md:,lg:,xl:,2xl: - State prefixes:
hover:,focus:,active:,group-hover: - Layout:
flex,grid,block,inline,hidden - Spacing:
p-*,m-*,px-*,py-*,mx-*,my-* - Sizing:
w-*,h-*,min-w-*,max-w-* - Typography:
text-*,font-*,leading-*,tracking-* - Visual:
bg-*,border-*,rounded-*,shadow-* - Flexbox/Grid:
gap-*,space-*,items-*,justify-*
Bootstrap Detection
Classes matching these patterns are recognized as Bootstrap:
- Grid:
container,row,col,col-md-6, etc. - Components:
btn,btn-primary,card,card-body,navbar - Utilities:
d-none,d-flex,mt-3,px-4, etc.
Automatic.css (ACSS) Detection
Custom properties (--*) and ACSS semantic class names are detected.
BEM Class Generation
Every converted element receives an auto-generated BEM class name for clean, predictable styling.
The format is {block}__{element}--{modifier}.
Naming Convention
| Bricks Element | BEM Element Part | Example |
|---|---|---|
| Root section/div | (block name) | bais-block-1 |
container | container | bais-block-1__container |
heading | heading | bais-block-1__heading |
text-basic | text | bais-block-1__text |
text | text | bais-block-1__text |
button | btn | bais-block-1__btn |
image | img | bais-block-1__img |
block | group | bais-block-1__group |
list | list | bais-block-1__list |
icon | icon | bais-block-1__icon |
code | code | bais-block-1__code |
video | video | bais-block-1__video |
| Any other element | element | bais-block-1__element |
Sibling Modifiers
When multiple siblings of the same type exist, an index modifier is appended:
bais-block-1__btn--1 bais-block-1__btn--2 bais-block-1__btn--3
Original CSS classes from the HTML are preserved; the BEM class is appended to them.
JavaScript Handling
JavaScript code (from <script> tags or the JS input field) is wrapped into Bricks
Code elements with executeCode: true. This means the script runs natively
on the frontend, identical to manually adding a Code element in Bricks.
What Gets Created
- JS only → Code element with
<script>...</script> - CSS only → Code element with
<style>...</style> - JS + CSS combined → Single Code element with both
<style>and<script>tags
Inline <script> tags in the original HTML are extracted, and external script references (src="...") are preserved as-is within the Code element.
Full Examples
Below are complete, real-world examples showing HTML+CSS input and the resulting Bricks element structure.
Example 1: Hero Section
Input HTML
<section class="hero" style="
background: linear-gradient(135deg, #1a1a2e, #16213e);
padding: 80px 40px;
text-align: center;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
">
<div class="hero-content" style="max-width: 800px;">
<h1 style="
font-size: 56px;
font-weight: 800;
color: #ffffff;
line-height: 1.1;
margin-bottom: 24px;
">Build Faster with AI</h1>
<p style="
font-size: 20px;
color: rgba(255,255,255,0.7);
line-height: 1.6;
margin-bottom: 40px;
">Generate beautiful Bricks sections from a simple text prompt.</p>
<a href="#pricing" style="
display: inline-flex;
padding: 16px 32px;
background-color: #6C5CE7;
color: #ffffff;
font-weight: 600;
border-radius: 8px;
text-decoration: none;
">Get Started Free</a>
</div>
</section>
Result: Bricks Element Tree
[
{
"name": "section",
"settings": {
"_cssClasses": "hero bais-block-1",
"_gradient": { "type": "linear", "angle": "135", "stops": [{ "color": "#1a1a2e" }, { "color": "#16213e" }] },
"_padding": { "top": "80px", "right": "40px", "bottom": "80px", "left": "40px" },
"_typography": { "text-align": "center" },
"_minHeight": "100vh",
"_display": "flex",
"_flexbox": { "alignItems": "center", "justifyContent": "center", "direction": "column" }
}
},
{
"name": "div",
"parent": "(section id)",
"settings": {
"_cssClasses": "hero-content bais-block-1__group",
"_maxWidth": "800px"
}
},
{
"name": "heading",
"settings": {
"tag": "h1",
"text": "Build Faster with AI",
"_cssClasses": "bais-block-1__heading",
"_typography": { "font-size": "56px", "font-weight": "800", "color": { "raw": "#ffffff" }, "line-height": "1.1" },
"_margin": { "bottom": "24px" }
}
},
{
"name": "text-basic",
"settings": {
"text": "Generate beautiful Bricks sections from a simple text prompt.",
"_cssClasses": "bais-block-1__text",
"_typography": { "font-size": "20px", "color": { "raw": "rgba(255,255,255,0.7)" }, "line-height": "1.6" },
"_margin": { "bottom": "40px" }
}
},
{
"name": "button",
"settings": {
"text": "Get Started Free",
"_cssClasses": "bais-block-1__btn",
"link": { "url": "#pricing", "type": "internal" },
"_display": "inline-flex",
"_padding": { "top": "16px", "right": "32px", "bottom": "16px", "left": "32px" },
"_background": { "color": { "raw": "#6C5CE7" } },
"_typography": { "color": { "raw": "#ffffff" }, "font-weight": "600", "text-decoration": "none" },
"_border": { "radius": { "top": "8px", "right": "8px", "bottom": "8px", "left": "8px" } }
}
}
]
Example 2: Feature Cards with CSS Stylesheet
Input HTML
<section class="features">
<h2 class="features-title">Why Choose Us</h2>
<div class="features-grid">
<div class="card">
<h3 class="card-title">Zero Bloat</h3>
<p class="card-text">No extra CSS or JS on the frontend.</p>
</div>
<div class="card">
<h3 class="card-title">Native Elements</h3>
<p class="card-text">Output is 100% native Bricks elements.</p>
</div>
<div class="card">
<h3 class="card-title">Your API Key</h3>
<p class="card-text">Use your own key — zero markup from us.</p>
</div>
</div>
</section>
Input CSS
.features {
padding: 80px 40px;
background-color: #0f0f23;
text-align: center;
}
.features-title {
font-size: 42px;
font-weight: 700;
color: #ffffff;
margin-bottom: 48px;
}
.features-grid {
display: flex;
gap: 24px;
justify-content: center;
flex-wrap: wrap;
max-width: 1200px;
margin: 0 auto;
}
.card {
background-color: rgba(255,255,255,0.05);
border: 1px solid rgba(255,255,255,0.1);
border-radius: 16px;
padding: 40px 32px;
width: 350px;
text-align: left;
transition: transform 0.3s ease;
}
.card-title {
font-size: 22px;
font-weight: 600;
color: #ffffff;
margin-bottom: 12px;
}
.card-text {
font-size: 16px;
color: rgba(255,255,255,0.6);
line-height: 1.6;
}
How CSS Gets Applied
The CSS Parser matches selectors to element class names. For example, .card matches any element with class card. The properties are then merged into that element's Bricks settings:
// .card selector matches elements with _cssClasses containing "card"
// Result for each card element:
{
"name": "div",
"settings": {
"_cssClasses": "card bais-block-1__group--1",
"_background": { "color": { "raw": "rgba(255,255,255,0.05)" } },
"_border": {
"width": { "top": "1px", "right": "1px", "bottom": "1px", "left": "1px" },
"style": "solid",
"color": { "raw": "rgba(255,255,255,0.1)" },
"radius": { "top": "16px", "right": "16px", "bottom": "16px", "left": "16px" }
},
"_padding": { "top": "40px", "right": "32px", "bottom": "40px", "left": "32px" },
"_width": "350px",
"_typography": { "text-align": "left" },
"_transition": { "property": "transform", "duration": "0.3s", "timing": "ease", "delay": "0s" }
}
}
Example 3: Pricing Table with Gradients & Shadows
Input HTML + Inline Styles
<section style="padding: 100px 40px; background-color: #0a0a1a;">
<h2 style="text-align: center; font-size: 48px; font-weight: 800;
color: #fff; margin-bottom: 60px;">Simple Pricing</h2>
<div style="display: flex; gap: 32px; justify-content: center;
flex-wrap: wrap; max-width: 1100px; margin: 0 auto;">
<!-- Basic Card -->
<div style="background-color: rgba(255,255,255,0.04);
border: 1px solid rgba(255,255,255,0.08);
border-radius: 20px; padding: 48px 36px; width: 320px;">
<h3 style="font-size: 24px; color: #fff; font-weight: 600;
margin-bottom: 8px;">Starter</h3>
<p style="font-size: 48px; font-weight: 800; color: #6C5CE7;
margin-bottom: 32px;">$10</p>
<a href="#buy" style="display: block; padding: 14px 24px;
background-color: rgba(108,92,231,0.15); color: #6C5CE7;
border-radius: 10px; text-align: center; font-weight: 600;
text-decoration: none;">Get Started</a>
</div>
<!-- Pro Card (highlighted) -->
<div style="background-image: linear-gradient(135deg, #6C5CE7, #a29bfe);
border-radius: 20px; padding: 48px 36px; width: 320px;
box-shadow: 0 20px 60px rgba(108,92,231,0.3);
transform: scale(1.05);">
<h3 style="font-size: 24px; color: #fff; font-weight: 600;
margin-bottom: 8px;">Pro</h3>
<p style="font-size: 48px; font-weight: 800; color: #ffffff;
margin-bottom: 32px;">$30</p>
<a href="#buy" style="display: block; padding: 14px 24px;
background-color: #fff; color: #6C5CE7; border-radius: 10px;
text-align: center; font-weight: 600;
text-decoration: none;">Get Started</a>
</div>
</div>
</section>
Key Mappings Demonstrated
| CSS Input | Bricks Output |
|---|---|
background-image: linear-gradient(135deg, #6C5CE7, #a29bfe) |
_gradient: { type: "linear", angle: "135", stops: [...] } |
box-shadow: 0 20px 60px rgba(108,92,231,0.3) |
_boxShadow: { values: { offsetX: "0", offsetY: "20px", blur: "60px", spread: "0px" }, color: { rgb: "rgba(108,92,231,0.3)" } } |
transform: scale(1.05) |
_transform: { scale: "1.05" } |
border-radius: 20px |
_border: { radius: { top: "20px", right: "20px", bottom: "20px", left: "20px" } } |
Example 4: Tailwind CSS Component
Tailwind classes in the HTML are preserved as CSS classes. The Framework Detector identifies Tailwind usage. If you also supply the compiled CSS, those Tailwind utility styles are mapped to Bricks settings as well.
Input HTML
<div class="flex items-center justify-between p-6
bg-gray-900 rounded-2xl shadow-lg max-w-md mx-auto">
<div>
<h3 class="text-xl font-bold text-white">Pro Plan</h3>
<p class="text-gray-400 text-sm mt-1">Unlimited access</p>
</div>
<a href="#" class="px-6 py-3 bg-purple-600 text-white
font-semibold rounded-lg hover:bg-purple-500
transition">Upgrade</a>
</div>
What Happens
- Framework Detector identifies Tailwind (classes like
flex,items-center,p-6,bg-gray-900match Tailwind patterns). - HTML Parser maps
<div>→block,<h3>→heading,<p>→text-basic,<a>→button. - CSS Classes are preserved on each element (e.g.
_cssClasses: "flex items-center justify-between p-6 bg-gray-900 rounded-2xl shadow-lg max-w-md mx-auto"). - If compiled Tailwind CSS is pasted in the CSS field, those utility values get mapped to Bricks GUI controls.
.p-6 { padding: 1.5rem }) to
Bricks settings rather than just preserving class names.
Example 5: Bootstrap Component
Input HTML
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Feature One</h5>
<p class="card-text">Description of the feature.</p>
<a href="#" class="btn btn-primary">Learn More</a>
</div>
</div>
</div>
</div>
</div>
What Happens
- Framework Detector identifies Bootstrap (
container,row,col-md-4,btn btn-primary). - The
<div class="card">triggers class-based detection — but since there's nocardclass hint in the mapper, it stays asblock. - All Bootstrap classes are preserved on elements.
- The
<a class="btn btn-primary">maps tobuttonwith link settings.
Example 7: Hero with Background Image
Input HTML
<section class="hero-bg" style="
background-image: url('https://example.com/hero.jpg');
background-size: cover;
background-position: center;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
position: relative;
">
<div class="hero-overlay" style="
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
background-color: rgba(0,0,0,0.6);
"></div>
<div class="hero-content" style="
position: relative;
z-index: 2;
text-align: center;
max-width: 900px;
padding: 0 40px;
">
<h1 style="font-size: 64px; font-weight: 900; color: #fff;
line-height: 1.05; margin-bottom: 20px;">
Transform Your Workflow
</h1>
<p style="font-size: 22px; color: rgba(255,255,255,0.8);
line-height: 1.6; margin-bottom: 40px;">
Automate repetitive tasks and focus on what matters most.
</p>
<div style="display: flex; gap: 16px; justify-content: center;">
<a href="#start" style="padding: 16px 36px; background-color: #6C5CE7;
color: #fff; border-radius: 10px; font-weight: 700;
text-decoration: none;">Start Free Trial</a>
<a href="#demo" style="padding: 16px 36px;
border: 2px solid rgba(255,255,255,0.3); color: #fff;
border-radius: 10px; font-weight: 600;
text-decoration: none;">Watch Demo</a>
</div>
</div>
</section>
Key Mappings
| CSS Input | Bricks Output |
|---|---|
background-image: url('...') | _background: { image: { url: "..." } } |
background-size: cover | _background: { size: "cover" } |
background-position: center | _background: { position: "center center" } |
position: absolute; top:0; left:0; right:0; bottom:0; | Overlay block with _position: "absolute" + all sides 0 |
Two <a> tags side by side | Two button elements inside a flex block |
Example 8: About / Bio Section
Input HTML
<section class="about">
<div class="about-inner">
<img src="https://example.com/avatar.jpg" alt="Photo"
class="about-avatar" />
<div class="about-text">
<h2 class="about-name">Jane Doe</h2>
<p class="about-role">Full-Stack Developer & Designer</p>
<p class="about-bio">With over 10 years of experience building
high-performance web applications, I specialise in turning ideas
into elegant, scalable products.</p>
<div class="about-links">
<a href="https://github.com">GitHub</a>
<a href="https://linkedin.com">LinkedIn</a>
<a href="mailto:[email protected]">Email</a>
</div>
</div>
</div>
</section>
Input CSS
.about {
padding: 100px 40px;
background-color: #0f0f23;
}
.about-inner {
display: flex;
align-items: center;
gap: 60px;
max-width: 1000px;
margin: 0 auto;
}
.about-avatar {
width: 280px;
height: 280px;
border-radius: 50%;
object-fit: cover;
border: 4px solid #6C5CE7;
}
.about-name {
font-size: 36px;
font-weight: 700;
color: #ffffff;
margin-bottom: 8px;
}
.about-role {
font-size: 18px;
color: #6C5CE7;
font-weight: 500;
margin-bottom: 20px;
}
.about-bio {
font-size: 16px;
color: rgba(255,255,255,0.7);
line-height: 1.8;
margin-bottom: 24px;
}
.about-links {
display: flex;
gap: 16px;
}
.about-links a {
color: rgba(255,255,255,0.6);
text-decoration: none;
font-size: 14px;
padding: 8px 16px;
border: 1px solid rgba(255,255,255,0.15);
border-radius: 6px;
}
Result: Bricks Element Tree
section (about)
└── block (about-inner) — flex, align-items:center, gap:60px
├── image (about-avatar) — 280×280, border-radius:50%, border:4px solid #6C5CE7
└── block (about-text)
├── heading h2 (about-name) — "Jane Doe"
├── text-basic (about-role) — color:#6C5CE7
├── text-basic (about-bio) — line-height:1.8
└── block (about-links) — flex, gap:16px
├── button (GitHub) — border, border-radius:6px
├── button (LinkedIn)
└── button (Email)
.about-links a selector uses a descendant combinator. The converter matches
simple class selectors only, so the <a> styles won't auto-apply. Use inline styles or simple
single-class selectors for best results.
Example 9: Services Grid
Input HTML
<section class="services" style="padding: 100px 40px; background-color: #0a0a1a;">
<h2 style="text-align: center; font-size: 42px; font-weight: 700;
color: #fff; margin-bottom: 16px;">Our Services</h2>
<p style="text-align: center; font-size: 18px;
color: rgba(255,255,255,0.6); margin-bottom: 60px;">
Everything you need to build modern websites.
</p>
<div style="display: grid; grid-template-columns: repeat(3, 1fr);
gap: 32px; max-width: 1200px; margin: 0 auto;">
<div class="service-card" style="background: rgba(255,255,255,0.04);
border-radius: 16px; padding: 40px 32px;
border: 1px solid rgba(255,255,255,0.08);">
<span style="font-size: 40px; display: block;
margin-bottom: 20px;">🎨</span>
<h3 style="font-size: 22px; color: #fff; font-weight: 600;
margin-bottom: 12px;">UI Design</h3>
<p style="font-size: 15px; color: rgba(255,255,255,0.6);
line-height: 1.7;">Beautiful, responsive designs that convert visitors into customers.</p>
</div>
<div class="service-card" style="background: rgba(255,255,255,0.04);
border-radius: 16px; padding: 40px 32px;
border: 1px solid rgba(255,255,255,0.08);">
<span style="font-size: 40px; display: block;
margin-bottom: 20px;">⚡</span>
<h3 style="font-size: 22px; color: #fff; font-weight: 600;
margin-bottom: 12px;">Development</h3>
<p style="font-size: 15px; color: rgba(255,255,255,0.6);
line-height: 1.7;">Clean, performant code built with modern frameworks and best practices.</p>
</div>
<div class="service-card" style="background: rgba(255,255,255,0.04);
border-radius: 16px; padding: 40px 32px;
border: 1px solid rgba(255,255,255,0.08);">
<span style="font-size: 40px; display: block;
margin-bottom: 20px;">🚀</span>
<h3 style="font-size: 22px; color: #fff; font-weight: 600;
margin-bottom: 12px;">SEO & Performance</h3>
<p style="font-size: 15px; color: rgba(255,255,255,0.6);
line-height: 1.7;">Optimised for speed and search-engine visibility from day one.</p>
</div>
</div>
</section>
Key Mappings
| CSS Input | Bricks Output |
|---|---|
display: grid; | _display: "grid" |
grid-template-columns: repeat(3, 1fr); | _gridTemplateColumns: "repeat(3, 1fr)" |
gap: 32px; | _columnGap: "32px", _rowGap: "32px" |
<span> with emoji text | text-basic element (inline text) |
Example 10: Team Members
Input HTML
<section class="team-section" style="padding: 80px 40px; background-color: #0f0f23;">
<h2 style="text-align: center; font-size: 40px; font-weight: 700;
color: #fff; margin-bottom: 48px;">Meet the Team</h2>
<div style="display: flex; gap: 32px; justify-content: center;
flex-wrap: wrap; max-width: 1100px; margin: 0 auto;">
<div class="team-member" style="text-align: center; width: 240px;">
<img src="https://example.com/team1.jpg" alt="Alice"
style="width: 140px; height: 140px; border-radius: 50%;
object-fit: cover; margin-bottom: 16px;" />
<h3 style="font-size: 20px; color: #fff; font-weight: 600;
margin-bottom: 4px;">Alice Chen</h3>
<p style="font-size: 14px; color: #6C5CE7;
margin-bottom: 8px;">Lead Designer</p>
<p style="font-size: 13px; color: rgba(255,255,255,0.5);
line-height: 1.6;">Crafting beautiful interfaces for over 8 years.</p>
</div>
<div class="team-member" style="text-align: center; width: 240px;">
<img src="https://example.com/team2.jpg" alt="Bob"
style="width: 140px; height: 140px; border-radius: 50%;
object-fit: cover; margin-bottom: 16px;" />
<h3 style="font-size: 20px; color: #fff; font-weight: 600;
margin-bottom: 4px;">Bob Park</h3>
<p style="font-size: 14px; color: #6C5CE7;
margin-bottom: 8px;">Full-Stack Dev</p>
<p style="font-size: 13px; color: rgba(255,255,255,0.5);
line-height: 1.6;">Building scalable systems with PHP and React.</p>
</div>
<div class="team-member" style="text-align: center; width: 240px;">
<img src="https://example.com/team3.jpg" alt="Carol"
style="width: 140px; height: 140px; border-radius: 50%;
object-fit: cover; margin-bottom: 16px;" />
<h3 style="font-size: 20px; color: #fff; font-weight: 600;
margin-bottom: 4px;">Carol Ruiz</h3>
<p style="font-size: 14px; color: #6C5CE7;
margin-bottom: 8px;">Marketing Lead</p>
<p style="font-size: 13px; color: rgba(255,255,255,0.5);
line-height: 1.6;">Growing brands through data-driven campaigns.</p>
</div>
</div>
</section>
Result: Bricks Element Tree
section (team-section)
├── heading h2 — "Meet the Team"
└── block — flex, gap:32px, flex-wrap:wrap
├── block (team-member) — text-align:center, width:240px
│ ├── image — 140×140, border-radius:50%, object-fit:cover
│ ├── heading h3 — "Alice Chen"
│ ├── text-basic — "Lead Designer", color:#6C5CE7
│ └── text-basic — bio text
├── block (team-member) ...
└── block (team-member) ...
team-member class does not trigger the team-members
class-detection hint because the class contains team as a substring. The converter would check
for team in the class name and map it to the team-members Bricks element.
For manual structure like this, avoid using the word "team" in class names, or use inline styles.
Example 11: Testimonials
Input HTML
<section class="reviews" style="padding: 80px 40px; background-color: #0a0a1a;">
<h2 style="text-align: center; font-size: 36px; color: #fff;
font-weight: 700; margin-bottom: 48px;">What Our Users Say</h2>
<div style="display: flex; gap: 24px; max-width: 1200px;
margin: 0 auto; flex-wrap: wrap; justify-content: center;">
<div class="review-card" style="background: rgba(255,255,255,0.04);
border-radius: 16px; padding: 36px; width: 360px;
border: 1px solid rgba(255,255,255,0.08);">
<p style="font-size: 16px; color: rgba(255,255,255,0.75);
line-height: 1.7; margin-bottom: 24px; font-style: italic;">
“Saved me hours every single week. I can't imagine
building Bricks sites without it.”
</p>
<div style="display: flex; align-items: center; gap: 12px;">
<img src="https://example.com/user1.jpg" alt="User"
style="width: 44px; height: 44px; border-radius: 50%;
object-fit: cover;" />
<div>
<p style="font-size: 15px; font-weight: 600;
color: #fff; margin-bottom: 2px;">Sarah M.</p>
<p style="font-size: 13px;
color: rgba(255,255,255,0.4);">Agency Owner</p>
</div>
</div>
</div>
<div class="review-card" style="background: rgba(255,255,255,0.04);
border-radius: 16px; padding: 36px; width: 360px;
border: 1px solid rgba(255,255,255,0.08);">
<p style="font-size: 16px; color: rgba(255,255,255,0.75);
line-height: 1.7; margin-bottom: 24px; font-style: italic;">
“The code-to-bricks feature alone is worth the price.
Incredible tool.”
</p>
<div style="display: flex; align-items: center; gap: 12px;">
<img src="https://example.com/user2.jpg" alt="User"
style="width: 44px; height: 44px; border-radius: 50%;
object-fit: cover;" />
<div>
<p style="font-size: 15px; font-weight: 600;
color: #fff; margin-bottom: 2px;">David L.</p>
<p style="font-size: 13px;
color: rgba(255,255,255,0.4);">Freelance Dev</p>
</div>
</div>
</div>
</div>
</section>
Result: Bricks Element Tree
section (reviews)
├── heading h2 — "What Our Users Say"
└── block — flex, gap:24px, flex-wrap:wrap
├── block (review-card) — rounded, padded, bordered
│ ├── text-basic — quote text, font-style:italic
│ └── block — flex, align-items:center, gap:12px
│ ├── image — 44×44, border-radius:50%
│ └── block
│ ├── text-basic — "Sarah M.", bold
│ └── text-basic — "Agency Owner"
└── block (review-card) ...
review-card does not contain "testimonial" so it
won't trigger the testimonials class hint. This is intentional — using
class="testimonial-card" would map it to the built-in testimonials Bricks element instead.
Example 12: Portfolio Gallery
Input HTML
<section class="portfolio" style="padding: 80px 40px; background-color: #0f0f23;">
<h2 style="text-align: center; font-size: 40px; font-weight: 700;
color: #fff; margin-bottom: 48px;">Recent Work</h2>
<div style="display: grid; grid-template-columns: repeat(3, 1fr);
gap: 20px; max-width: 1200px; margin: 0 auto;">
<div class="portfolio-item" style="position: relative;
border-radius: 12px; overflow: hidden;">
<img src="https://example.com/project1.jpg" alt="Project 1"
style="width: 100%; height: 300px; object-fit: cover;
display: block;" />
<div style="position: absolute; bottom: 0; left: 0; right: 0;
padding: 24px;
background: linear-gradient(transparent, rgba(0,0,0,0.8));">
<h3 style="font-size: 18px; color: #fff;
font-weight: 600;">E-Commerce Redesign</h3>
<p style="font-size: 13px;
color: rgba(255,255,255,0.6);">UI/UX • 2024</p>
</div>
</div>
<div class="portfolio-item" style="position: relative;
border-radius: 12px; overflow: hidden;">
<img src="https://example.com/project2.jpg" alt="Project 2"
style="width: 100%; height: 300px; object-fit: cover;
display: block;" />
<div style="position: absolute; bottom: 0; left: 0; right: 0;
padding: 24px;
background: linear-gradient(transparent, rgba(0,0,0,0.8));">
<h3 style="font-size: 18px; color: #fff;
font-weight: 600;">SaaS Dashboard</h3>
<p style="font-size: 13px;
color: rgba(255,255,255,0.6);">Product • 2024</p>
</div>
</div>
<div class="portfolio-item" style="position: relative;
border-radius: 12px; overflow: hidden;">
<img src="https://example.com/project3.jpg" alt="Project 3"
style="width: 100%; height: 300px; object-fit: cover;
display: block;" />
<div style="position: absolute; bottom: 0; left: 0; right: 0;
padding: 24px;
background: linear-gradient(transparent, rgba(0,0,0,0.8));">
<h3 style="font-size: 18px; color: #fff;
font-weight: 600;">Brand Identity</h3>
<p style="font-size: 13px;
color: rgba(255,255,255,0.6);">Branding • 2023</p>
</div>
</div>
</div>
</section>
Key Mappings
| CSS Input | Bricks Output |
|---|---|
overflow: hidden; | _overflow: "hidden" |
position: absolute; bottom:0; left:0; right:0; | Overlay block with _position: "absolute" |
background: linear-gradient(transparent, rgba(0,0,0,0.8)) | _gradient with stops |
object-fit: cover; | _objectFit: "cover" |
Example 13: Blog Post Cards
Input HTML
<section style="padding: 80px 40px; background-color: #0a0a1a;">
<h2 style="text-align: center; font-size: 36px; color: #fff;
font-weight: 700; margin-bottom: 48px;">Latest Articles</h2>
<div style="display: grid; grid-template-columns: repeat(3, 1fr);
gap: 28px; max-width: 1200px; margin: 0 auto;">
<article class="blog-card" style="background: rgba(255,255,255,0.03);
border-radius: 14px; overflow: hidden;
border: 1px solid rgba(255,255,255,0.06);">
<img src="https://example.com/blog1.jpg" alt="Post"
style="width: 100%; height: 200px; object-fit: cover;" />
<div style="padding: 28px;">
<span style="font-size: 12px; color: #6C5CE7;
font-weight: 600; text-transform: uppercase;
letter-spacing: 1px;">Tutorial</span>
<h3 style="font-size: 20px; color: #fff; font-weight: 600;
margin: 12px 0; line-height: 1.4;">
How to Build a Landing Page in 10 Minutes
</h3>
<p style="font-size: 14px; color: rgba(255,255,255,0.55);
line-height: 1.7; margin-bottom: 20px;">
A step-by-step guide to converting HTML templates into
fully editable Bricks layouts.
</p>
<a href="#read" style="font-size: 14px; color: #6C5CE7;
text-decoration: none; font-weight: 600;">
Read More →
</a>
</div>
</article>
<article class="blog-card" style="background: rgba(255,255,255,0.03);
border-radius: 14px; overflow: hidden;
border: 1px solid rgba(255,255,255,0.06);">
<img src="https://example.com/blog2.jpg" alt="Post"
style="width: 100%; height: 200px; object-fit: cover;" />
<div style="padding: 28px;">
<span style="font-size: 12px; color: #6C5CE7;
font-weight: 600; text-transform: uppercase;
letter-spacing: 1px;">Tips</span>
<h3 style="font-size: 20px; color: #fff; font-weight: 600;
margin: 12px 0; line-height: 1.4;">
5 CSS Tricks for Better Bricks Conversions
</h3>
<p style="font-size: 14px; color: rgba(255,255,255,0.55);
line-height: 1.7; margin-bottom: 20px;">
Optimise your stylesheets to get the best possible output
from the Code to Bricks pipeline.
</p>
<a href="#read" style="font-size: 14px; color: #6C5CE7;
text-decoration: none; font-weight: 600;">
Read More →
</a>
</div>
</article>
<article class="blog-card" style="background: rgba(255,255,255,0.03);
border-radius: 14px; overflow: hidden;
border: 1px solid rgba(255,255,255,0.06);">
<img src="https://example.com/blog3.jpg" alt="Post"
style="width: 100%; height: 200px; object-fit: cover;" />
<div style="padding: 28px;">
<span style="font-size: 12px; color: #6C5CE7;
font-weight: 600; text-transform: uppercase;
letter-spacing: 1px;">Updates</span>
<h3 style="font-size: 20px; color: #fff; font-weight: 600;
margin: 12px 0; line-height: 1.4;">
What's New in Version 2.0
</h3>
<p style="font-size: 14px; color: rgba(255,255,255,0.55);
line-height: 1.7; margin-bottom: 20px;">
Explore the latest features including AI prompts, template
library, and improved CSS parsing.
</p>
<a href="#read" style="font-size: 14px; color: #6C5CE7;
text-decoration: none; font-weight: 600;">
Read More →
</a>
</div>
</article>
</div>
</section>
Result: Bricks Element Tree
section
├── heading h2 — "Latest Articles"
└── block — display:grid, 3 columns, gap:28px
├── block (blog-card) — <article> maps to block, overflow:hidden
│ ├── image — width:100%, height:200px, object-fit:cover
│ └── block — padding:28px
│ ├── text-basic — "Tutorial", uppercase, color:#6C5CE7
│ ├── heading h3 — post title
│ ├── text-basic — excerpt
│ └── button — "Read More →", link
├── block (blog-card) ...
└── block (blog-card) ...
<article> HTML tag maps to a Bricks block element.
The <span> tag for the category label maps to text-basic.
text-transform: uppercase and letter-spacing are mapped to _typography.
Example 14: Statistics Section
Input HTML
<section style="padding: 60px 40px;
background: linear-gradient(135deg, #6C5CE7, #a29bfe);">
<div style="display: flex; justify-content: center; gap: 80px;
flex-wrap: wrap; max-width: 1000px; margin: 0 auto;">
<div style="text-align: center;">
<p style="font-size: 48px; font-weight: 800;
color: #fff; margin-bottom: 4px;">10,000+</p>
<p style="font-size: 15px; color: rgba(255,255,255,0.8);
text-transform: uppercase; letter-spacing: 2px;">Users</p>
</div>
<div style="text-align: center;">
<p style="font-size: 48px; font-weight: 800;
color: #fff; margin-bottom: 4px;">50M+</p>
<p style="font-size: 15px; color: rgba(255,255,255,0.8);
text-transform: uppercase; letter-spacing: 2px;">Elements Created</p>
</div>
<div style="text-align: center;">
<p style="font-size: 48px; font-weight: 800;
color: #fff; margin-bottom: 4px;">99.9%</p>
<p style="font-size: 15px; color: rgba(255,255,255,0.8);
text-transform: uppercase; letter-spacing: 2px;">Uptime</p>
</div>
</div>
</section>
Key Mappings
| CSS Input | Bricks Output |
|---|---|
background: linear-gradient(135deg, #6C5CE7, #a29bfe) | _gradient: { type:"linear", angle:"135", stops:[...] } |
text-transform: uppercase; letter-spacing: 2px; | _typography: { text-transform:"uppercase", letter-spacing:"2px" } |
Large number text in <p> | text-basic (not counter — no class hint) |
counter elements, add a class
containing "counter" or "stat" to the wrapper block (e.g. class="stat-item").
Example 15: Timeline / Experience
Input HTML
<section class="timeline-section" style="padding: 80px 40px;
background-color: #0a0a1a;">
<h2 style="text-align: center; font-size: 36px; color: #fff;
font-weight: 700; margin-bottom: 60px;">Experience</h2>
<div style="max-width: 700px; margin: 0 auto;
border-left: 2px solid rgba(108,92,231,0.4);
padding-left: 40px;">
<div style="margin-bottom: 48px; position: relative;">
<div style="position: absolute; left: -50px; top: 4px;
width: 16px; height: 16px; border-radius: 50%;
background-color: #6C5CE7;"></div>
<span style="font-size: 13px; color: #6C5CE7;
font-weight: 600;">2022 – Present</span>
<h3 style="font-size: 20px; color: #fff; font-weight: 600;
margin: 8px 0 6px;">Senior Developer — Acme Corp</h3>
<p style="font-size: 15px; color: rgba(255,255,255,0.6);
line-height: 1.7;">Lead a team of five building SaaS
products with React and Laravel.</p>
</div>
<div style="margin-bottom: 48px; position: relative;">
<div style="position: absolute; left: -50px; top: 4px;
width: 16px; height: 16px; border-radius: 50%;
background-color: #6C5CE7;"></div>
<span style="font-size: 13px; color: #6C5CE7;
font-weight: 600;">2019 – 2022</span>
<h3 style="font-size: 20px; color: #fff; font-weight: 600;
margin: 8px 0 6px;">Frontend Developer — StartupXYZ</h3>
<p style="font-size: 15px; color: rgba(255,255,255,0.6);
line-height: 1.7;">Built responsive UIs and component
libraries using Vue.js and SCSS.</p>
</div>
<div style="position: relative;">
<div style="position: absolute; left: -50px; top: 4px;
width: 16px; height: 16px; border-radius: 50%;
background-color: #6C5CE7;"></div>
<span style="font-size: 13px; color: #6C5CE7;
font-weight: 600;">2017 – 2019</span>
<h3 style="font-size: 20px; color: #fff; font-weight: 600;
margin: 8px 0 6px;">Junior Developer — Freelance</h3>
<p style="font-size: 15px; color: rgba(255,255,255,0.6);
line-height: 1.7;">WordPress themes, landing pages,
and small business websites.</p>
</div>
</div>
</section>
Key Mappings
| CSS Input | Bricks Output |
|---|---|
border-left: 2px solid rgba(108,92,231,0.4) | _border: { left: { width:"2px", style:"solid", color:{ raw:"rgba(108,92,231,0.4)" } } } |
position: absolute; left: -50px; | _position:"absolute", _left:"-50px" |
Dot <div> (16×16, radius:50%) | block with _width, _height, _border radius:50% |
Example 16: FAQ / Accordion
Input HTML
<section style="padding: 80px 40px; background-color: #0f0f23;">
<h2 style="text-align: center; font-size: 36px; color: #fff;
font-weight: 700; margin-bottom: 48px;">Frequently Asked Questions</h2>
<div class="accordion" style="max-width: 800px; margin: 0 auto;">
<div class="accordion-item" style="border-bottom: 1px solid rgba(255,255,255,0.1);
padding: 24px 0;">
<h3 style="font-size: 18px; color: #fff; font-weight: 600;
margin-bottom: 12px;">Is my API key stored securely?</h3>
<p style="font-size: 15px; color: rgba(255,255,255,0.6);
line-height: 1.7;">Yes — your API key is encrypted with AES-256-CBC
and stored locally in your WordPress database. We never transmit it
to our servers.</p>
</div>
<div class="accordion-item" style="border-bottom: 1px solid rgba(255,255,255,0.1);
padding: 24px 0;">
<h3 style="font-size: 18px; color: #fff; font-weight: 600;
margin-bottom: 12px;">Does this work with Bricks 1.9+?</h3>
<p style="font-size: 15px; color: rgba(255,255,255,0.6);
line-height: 1.7;">Absolutely. BricksAI Studio is tested and
compatible with Bricks 1.9 and above.</p>
</div>
<div class="accordion-item" style="border-bottom: 1px solid rgba(255,255,255,0.1);
padding: 24px 0;">
<h3 style="font-size: 18px; color: #fff; font-weight: 600;
margin-bottom: 12px;">Can I cancel anytime?</h3>
<p style="font-size: 15px; color: rgba(255,255,255,0.6);
line-height: 1.7;">Yes, all plans are month-to-month with no
long-term commitment. Cancel any time from your account.</p>
</div>
</div>
</section>
Result: Bricks Element Tree
section
├── heading h2 — "Frequently Asked Questions"
└── accordion-nested (class "accordion" triggers class-hint!)
├── block (accordion-item) — border-bottom, padding
│ ├── heading h3 — question text
│ └── text-basic — answer text
├── block (accordion-item) ...
└── block (accordion-item) ...
class="accordion", the
converter maps it to a Bricks accordion-nested element instead of a plain block.
Example 17: Contact Form
Input HTML
<section style="padding: 80px 40px; background-color: #0a0a1a;">
<div style="max-width: 600px; margin: 0 auto;">
<h2 style="font-size: 36px; color: #fff; font-weight: 700;
text-align: center; margin-bottom: 40px;">Get in Touch</h2>
<form style="display: flex; flex-direction: column; gap: 20px;">
<div style="display: flex; gap: 16px;">
<input type="text" placeholder="First Name" style="
flex: 1; padding: 14px 18px; border-radius: 10px;
border: 1px solid rgba(255,255,255,0.1);
background-color: rgba(255,255,255,0.04);
color: #fff; font-size: 15px;" />
<input type="text" placeholder="Last Name" style="
flex: 1; padding: 14px 18px; border-radius: 10px;
border: 1px solid rgba(255,255,255,0.1);
background-color: rgba(255,255,255,0.04);
color: #fff; font-size: 15px;" />
</div>
<input type="email" placeholder="Email Address" style="
padding: 14px 18px; border-radius: 10px;
border: 1px solid rgba(255,255,255,0.1);
background-color: rgba(255,255,255,0.04);
color: #fff; font-size: 15px;" />
<textarea placeholder="Your Message" rows="5" style="
padding: 14px 18px; border-radius: 10px;
border: 1px solid rgba(255,255,255,0.1);
background-color: rgba(255,255,255,0.04);
color: #fff; font-size: 15px; resize: vertical;"></textarea>
<button type="submit" style="
padding: 16px 32px; background-color: #6C5CE7;
color: #fff; border: none; border-radius: 10px;
font-size: 16px; font-weight: 600;
cursor: pointer;">Send Message</button>
</form>
</div>
</section>
Result: Bricks Element Tree
section
└── block — max-width:600px
├── heading h2 — "Get in Touch"
└── block (form) — flex, column, gap:20px
├── block — flex, gap:16px (name row)
│ ├── text-basic (input) — placeholder, rounded, bordered
│ └── text-basic (input) — placeholder, rounded, bordered
├── text-basic (email input)
├── text-basic (textarea)
└── button — "Send Message", bg:#6C5CE7
<form>, <input>, and <textarea>
tags map to block / text-basic elements in the tree structure. The form fields will
retain their styling but are not converted into Bricks' native form builder. For functional forms, you'll
need to use Bricks' Form element after conversion.
Example 18: Contact Info Cards
Input HTML
<section style="padding: 80px 40px; background-color: #0f0f23;">
<div style="display: flex; gap: 24px; justify-content: center;
flex-wrap: wrap; max-width: 1000px; margin: 0 auto;">
<div style="background: rgba(255,255,255,0.04);
border-radius: 16px; padding: 36px; width: 280px;
text-align: center;
border: 1px solid rgba(255,255,255,0.08);">
<span style="font-size: 32px; display: block;
margin-bottom: 16px;">📍</span>
<h3 style="font-size: 18px; color: #fff;
font-weight: 600; margin-bottom: 8px;">Address</h3>
<p style="font-size: 14px; color: rgba(255,255,255,0.6);
line-height: 1.6;">123 Tech Street<br>San Francisco, CA 94105</p>
</div>
<div style="background: rgba(255,255,255,0.04);
border-radius: 16px; padding: 36px; width: 280px;
text-align: center;
border: 1px solid rgba(255,255,255,0.08);">
<span style="font-size: 32px; display: block;
margin-bottom: 16px;">✉️</span>
<h3 style="font-size: 18px; color: #fff;
font-weight: 600; margin-bottom: 8px;">Email</h3>
<p style="font-size: 14px; color: rgba(255,255,255,0.6);">
<a href="mailto:[email protected]" style="color: #6C5CE7;
text-decoration: none;">[email protected]</a>
</p>
</div>
<div style="background: rgba(255,255,255,0.04);
border-radius: 16px; padding: 36px; width: 280px;
text-align: center;
border: 1px solid rgba(255,255,255,0.08);">
<span style="font-size: 32px; display: block;
margin-bottom: 16px;">📞</span>
<h3 style="font-size: 18px; color: #fff;
font-weight: 600; margin-bottom: 8px;">Phone</h3>
<p style="font-size: 14px; color: rgba(255,255,255,0.6);">
+1 (555) 123-4567
</p>
</div>
</div>
</section>
Result: Bricks Element Tree
section
└── block — flex, gap:24px, flex-wrap:wrap
├── block — text-align:center, 280px wide
│ ├── text-basic — "📍" emoji
│ ├── heading h3 — "Address"
│ └── text-basic — address text (preserves <br>)
├── block — email card
│ ├── text-basic — "✉️" emoji
│ ├── heading h3 — "Email"
│ └── text-basic > button — "[email protected]" with mailto link
└── block — phone card ...
Example 19: CTA Banner
Input HTML
<section style="padding: 80px 40px;
background: linear-gradient(135deg, #6C5CE7, #a29bfe);
text-align: center;">
<h2 style="font-size: 44px; font-weight: 800; color: #fff;
margin-bottom: 16px;">Ready to Get Started?</h2>
<p style="font-size: 20px; color: rgba(255,255,255,0.85);
margin-bottom: 36px; max-width: 600px;
margin-left: auto; margin-right: auto;">
Join thousands of developers building beautiful
Bricks websites faster than ever.
</p>
<div style="display: flex; gap: 16px; justify-content: center;">
<a href="#signup" style="padding: 16px 36px;
background-color: #fff; color: #6C5CE7;
border-radius: 10px; font-weight: 700; font-size: 16px;
text-decoration: none;">Start Free Trial</a>
<a href="#contact" style="padding: 16px 36px;
border: 2px solid rgba(255,255,255,0.4);
color: #fff; border-radius: 10px; font-weight: 600;
font-size: 16px; text-decoration: none;">Talk to Sales</a>
</div>
</section>
Result: Bricks Element Tree
section — gradient bg, text-align:center
├── heading h2 — "Ready to Get Started?"
├── text-basic — subtitle text, max-width:600px
└── block — flex, gap:16px, justify-content:center
├── button — "Start Free Trial", bg:white, color:#6C5CE7
└── button — "Talk to Sales", border outline style
Example 20: Newsletter Signup
Input HTML
<section style="padding: 60px 40px; background-color: #0a0a1a;
border-top: 1px solid rgba(255,255,255,0.06);
border-bottom: 1px solid rgba(255,255,255,0.06);">
<div style="max-width: 600px; margin: 0 auto; text-align: center;">
<h3 style="font-size: 28px; color: #fff; font-weight: 700;
margin-bottom: 12px;">Stay in the Loop</h3>
<p style="font-size: 16px; color: rgba(255,255,255,0.6);
margin-bottom: 28px;">Get product updates and tips delivered
to your inbox. No spam, ever.</p>
<div style="display: flex; gap: 12px;">
<input type="email" placeholder="[email protected]"
style="flex: 1; padding: 14px 20px; border-radius: 10px;
border: 1px solid rgba(255,255,255,0.12);
background: rgba(255,255,255,0.04);
color: #fff; font-size: 15px;" />
<button style="padding: 14px 28px; background-color: #6C5CE7;
color: #fff; border: none; border-radius: 10px;
font-weight: 600; font-size: 15px;">Subscribe</button>
</div>
</div>
</section>
Result: Bricks Element Tree
section — border-top, border-bottom
└── block — max-width:600px, text-align:center
├── heading h3 — "Stay in the Loop"
├── text-basic — description
└── block — flex, gap:12px
├── text-basic (input) — flex:1, placeholder styling
└── button — "Subscribe", bg:#6C5CE7
Example 22: Login Form
Input HTML
<section style="min-height: 100vh; display: flex; align-items: center;
justify-content: center; background-color: #0a0a1a;">
<div style="width: 400px; background: rgba(255,255,255,0.04);
border-radius: 20px; padding: 48px;
border: 1px solid rgba(255,255,255,0.08);">
<h2 style="font-size: 28px; color: #fff; font-weight: 700;
text-align: center; margin-bottom: 32px;">Welcome Back</h2>
<form style="display: flex; flex-direction: column; gap: 16px;">
<label style="font-size: 13px; color: rgba(255,255,255,0.5);
margin-bottom: -8px;">Email</label>
<input type="email" placeholder="[email protected]" style="
padding: 14px 18px; border-radius: 10px;
border: 1px solid rgba(255,255,255,0.1);
background: rgba(255,255,255,0.04);
color: #fff; font-size: 15px;" />
<label style="font-size: 13px; color: rgba(255,255,255,0.5);
margin-bottom: -8px;">Password</label>
<input type="password" placeholder="••••••••" style="
padding: 14px 18px; border-radius: 10px;
border: 1px solid rgba(255,255,255,0.1);
background: rgba(255,255,255,0.04);
color: #fff; font-size: 15px;" />
<button type="submit" style="padding: 16px; margin-top: 8px;
background-color: #6C5CE7; color: #fff;
border: none; border-radius: 10px; font-size: 16px;
font-weight: 600;">Sign In</button>
</form>
<p style="text-align: center; font-size: 14px;
color: rgba(255,255,255,0.4); margin-top: 20px;">
Don't have an account?
<a href="#register" style="color: #6C5CE7;
text-decoration: none;">Sign Up</a>
</p>
</div>
</section>
Result: Bricks Element Tree
section — min-height:100vh, flex center
└── block — 400px wide, rounded card
├── heading h2 — "Welcome Back"
├── block (form) — flex column, gap:16px
│ ├── text-basic (label) — "Email"
│ ├── text-basic (input) — email field
│ ├── text-basic (label) — "Password"
│ ├── text-basic (input) — password field
│ └── button — "Sign In"
└── text-basic — "Don't have an account? Sign Up"
└── button (a) — "Sign Up" link
Example 23: 404 Error Page
Input HTML
<section style="min-height: 100vh; display: flex; align-items: center;
justify-content: center; background-color: #0a0a1a;
text-align: center; padding: 40px;">
<div style="max-width: 500px;">
<h1 style="font-size: 120px; font-weight: 900;
background: linear-gradient(135deg, #6C5CE7, #a29bfe);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 16px;">404</h1>
<h2 style="font-size: 28px; color: #fff; font-weight: 700;
margin-bottom: 16px;">Page Not Found</h2>
<p style="font-size: 16px; color: rgba(255,255,255,0.6);
line-height: 1.7; margin-bottom: 32px;">
The page you're looking for doesn't exist or has been moved.
</p>
<a href="/" style="display: inline-flex; padding: 14px 32px;
background-color: #6C5CE7; color: #fff;
border-radius: 10px; font-weight: 600;
text-decoration: none;">Go Home</a>
</div>
</section>
Key Mappings
| CSS Input | Bricks Output |
|---|---|
-webkit-background-clip: text; | _cssCustom: "%root% { -webkit-background-clip: text; }" |
-webkit-text-fill-color: transparent; | _cssCustom: "%root% { -webkit-text-fill-color: transparent; }" |
background: linear-gradient(135deg, ...) | _gradient with stops (on the heading) |
-webkit-background-clip and
-webkit-text-fill-color don't have Bricks GUI equivalents. They are automatically
placed into _cssCustom and will still render correctly on the frontend.
Example 24: Image + Text Split Layout
Input HTML
<section style="padding: 80px 40px; background-color: #0f0f23;">
<div style="display: flex; align-items: center; gap: 60px;
max-width: 1200px; margin: 0 auto;">
<div style="flex: 1;">
<img src="https://example.com/product-screenshot.jpg"
alt="Product"
style="width: 100%; border-radius: 16px;
box-shadow: 0 20px 40px rgba(0,0,0,0.3);" />
</div>
<div style="flex: 1;">
<span style="font-size: 13px; color: #6C5CE7;
font-weight: 600; text-transform: uppercase;
letter-spacing: 2px; margin-bottom: 12px;
display: block;">Built for Speed</span>
<h2 style="font-size: 40px; font-weight: 700; color: #fff;
line-height: 1.2; margin-bottom: 20px;">
Designed for the Modern Web
</h2>
<p style="font-size: 17px; color: rgba(255,255,255,0.65);
line-height: 1.8; margin-bottom: 28px;">
Our platform combines intuitive design tools with
powerful AI to help you build stunning websites in minutes.
</p>
<ul style="list-style: none; padding: 0; margin: 0 0 32px;
display: flex; flex-direction: column; gap: 12px;">
<li style="font-size: 15px; color: rgba(255,255,255,0.7);">
✓ Zero bloat on the frontend
</li>
<li style="font-size: 15px; color: rgba(255,255,255,0.7);">
✓ Native Bricks elements only
</li>
<li style="font-size: 15px; color: rgba(255,255,255,0.7);">
✓ Works with any Bricks theme
</li>
</ul>
<a href="#learn-more" style="padding: 14px 28px;
background-color: #6C5CE7; color: #fff;
border-radius: 10px; font-weight: 600;
text-decoration: none;">Learn More</a>
</div>
</div>
</section>
Result: Bricks Element Tree
section
└── block — flex, align-items:center, gap:60px
├── block — flex:1 (image column)
│ └── image — width:100%, border-radius:16px, box-shadow
└── block — flex:1 (text column)
├── text-basic — "Built for Speed", uppercase
├── heading h2 — "Designed for the Modern Web"
├── text-basic — description paragraph
├── block (ul) — flex column, gap:12px
│ ├── block (li) — "✓ Zero bloat..."
│ ├── block (li) — "✓ Native Bricks..."
│ └── block (li) — "✓ Works with..."
└── button — "Learn More", link
Example 25: Logo / Client Bar
Input HTML
<section style="padding: 48px 40px; background-color: #0a0a1a;
border-top: 1px solid rgba(255,255,255,0.06);
border-bottom: 1px solid rgba(255,255,255,0.06);">
<p style="text-align: center; font-size: 13px;
color: rgba(255,255,255,0.35); text-transform: uppercase;
letter-spacing: 2px; margin-bottom: 28px;">
Trusted by teams at
</p>
<div style="display: flex; align-items: center;
justify-content: center; gap: 48px; flex-wrap: wrap;
max-width: 900px; margin: 0 auto; opacity: 0.5;">
<img src="https://example.com/logo1.svg" alt="Company 1"
style="height: 32px;" />
<img src="https://example.com/logo2.svg" alt="Company 2"
style="height: 28px;" />
<img src="https://example.com/logo3.svg" alt="Company 3"
style="height: 34px;" />
<img src="https://example.com/logo4.svg" alt="Company 4"
style="height: 30px;" />
<img src="https://example.com/logo5.svg" alt="Company 5"
style="height: 32px;" />
</div>
</section>
Result: Bricks Element Tree
section — border-top, border-bottom
├── text-basic — "Trusted by teams at", uppercase
└── block — flex, gap:48px, opacity:0.5
├── image — logo1.svg, height:32px
├── image — logo2.svg, height:28px
├── image — logo3.svg, height:34px
├── image — logo4.svg, height:30px
└── image — logo5.svg, height:32px
opacity: 0.5 on the logos wrapper maps to _opacity: "0.5"
in Bricks settings. Each <img> maps to an image element with
_height set.
Example 26: Feature Comparison Table
Input HTML
<section style="padding: 80px 40px; background-color: #0a0a1a;">
<h2 style="text-align: center; font-size: 36px; color: #fff;
font-weight: 700; margin-bottom: 48px;">Compare Plans</h2>
<div style="max-width: 800px; margin: 0 auto; overflow-x: auto;">
<table style="width: 100%; border-collapse: collapse;
font-size: 15px; color: rgba(255,255,255,0.7);">
<thead>
<tr>
<th style="text-align: left; padding: 16px;
border-bottom: 2px solid rgba(255,255,255,0.1);
color: #fff; font-weight: 600;">Feature</th>
<th style="text-align: center; padding: 16px;
border-bottom: 2px solid rgba(255,255,255,0.1);
color: #fff; font-weight: 600;">Free</th>
<th style="text-align: center; padding: 16px;
border-bottom: 2px solid rgba(255,255,255,0.1);
color: #6C5CE7; font-weight: 600;">Pro</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 14px 16px;
border-bottom: 1px solid rgba(255,255,255,0.06);">
AI Generations</td>
<td style="text-align: center; padding: 14px;
border-bottom: 1px solid rgba(255,255,255,0.06);">
50/mo</td>
<td style="text-align: center; padding: 14px;
border-bottom: 1px solid rgba(255,255,255,0.06);">
Unlimited</td>
</tr>
<tr>
<td style="padding: 14px 16px;
border-bottom: 1px solid rgba(255,255,255,0.06);">
Code to Bricks</td>
<td style="text-align: center; padding: 14px;
border-bottom: 1px solid rgba(255,255,255,0.06);">
✓</td>
<td style="text-align: center; padding: 14px;
border-bottom: 1px solid rgba(255,255,255,0.06);">
✓</td>
</tr>
<tr>
<td style="padding: 14px 16px;
border-bottom: 1px solid rgba(255,255,255,0.06);">
Template Library</td>
<td style="text-align: center; padding: 14px;
border-bottom: 1px solid rgba(255,255,255,0.06);">
10</td>
<td style="text-align: center; padding: 14px;
border-bottom: 1px solid rgba(255,255,255,0.06);">
All</td>
</tr>
<tr>
<td style="padding: 14px 16px;">Priority Support</td>
<td style="text-align: center; padding: 14px;">—</td>
<td style="text-align: center; padding: 14px;">✓</td>
</tr>
</tbody>
</table>
</div>
</section>
Result: Bricks Element Tree
section
├── heading h2 — "Compare Plans"
└── block — overflow-x:auto
└── code (table) — entire <table> preserved as raw HTML
<table> structures are preserved as raw HTML inside a
Bricks Code element rather than broken into individual block/text elements. This ensures the
table renders correctly with all <thead>, <tbody>, <th>,
and <td> relationships intact.
Example 27: Breadcrumbs
Input HTML
<nav class="breadcrumb" style="padding: 16px 40px;
background-color: rgba(255,255,255,0.02);
border-bottom: 1px solid rgba(255,255,255,0.06);">
<ul style="display: flex; gap: 8px; align-items: center;
list-style: none; padding: 0; margin: 0;
font-size: 14px;">
<li><a href="/" style="color: rgba(255,255,255,0.5);
text-decoration: none;">Home</a></li>
<li style="color: rgba(255,255,255,0.3);">/</li>
<li><a href="/docs" style="color: rgba(255,255,255,0.5);
text-decoration: none;">Documentation</a></li>
<li style="color: rgba(255,255,255,0.3);">/</li>
<li style="color: #6C5CE7;">Code to Bricks</li>
</ul>
</nav>
Result: Bricks Element Tree
section (nav → section)
└── block (ul) — flex, gap:8px
├── block (li) > button — "Home" link
├── block (li) — "/" separator
├── block (li) > button — "Documentation" link
├── block (li) — "/" separator
└── block (li) — "Code to Bricks", color:#6C5CE7
class="breadcrumb" triggers the class-hint for
breadcrumbs, which maps to the Bricks built-in breadcrumbs element.
If you want breadcrumbs as individual elements (as shown above), avoid that class name.
Example 28: Pagination
Input HTML
<nav style="display: flex; justify-content: center;
gap: 8px; padding: 40px;">
<a href="#" style="width: 40px; height: 40px;
display: flex; align-items: center; justify-content: center;
border-radius: 8px; font-size: 14px; font-weight: 500;
color: rgba(255,255,255,0.5); text-decoration: none;
border: 1px solid rgba(255,255,255,0.1);">«</a>
<a href="#" style="width: 40px; height: 40px;
display: flex; align-items: center; justify-content: center;
border-radius: 8px; font-size: 14px; font-weight: 500;
color: rgba(255,255,255,0.5); text-decoration: none;
border: 1px solid rgba(255,255,255,0.1);">1</a>
<a href="#" style="width: 40px; height: 40px;
display: flex; align-items: center; justify-content: center;
border-radius: 8px; font-size: 14px; font-weight: 600;
color: #fff; text-decoration: none;
background-color: #6C5CE7;">2</a>
<a href="#" style="width: 40px; height: 40px;
display: flex; align-items: center; justify-content: center;
border-radius: 8px; font-size: 14px; font-weight: 500;
color: rgba(255,255,255,0.5); text-decoration: none;
border: 1px solid rgba(255,255,255,0.1);">3</a>
<a href="#" style="width: 40px; height: 40px;
display: flex; align-items: center; justify-content: center;
border-radius: 8px; font-size: 14px; font-weight: 500;
color: rgba(255,255,255,0.5); text-decoration: none;
border: 1px solid rgba(255,255,255,0.1);">»</a>
</nav>
Result: Bricks Element Tree
section (nav) — flex, justify-content:center, gap:8px
├── button — "«" prev, 40×40, border
├── button — "1", 40×40, border
├── button — "2", 40×40, bg:#6C5CE7 (active)
├── button — "3", 40×40, border
└── button — "»" next, 40×40, border
Example 29: Social Media Links
Input HTML
<div class="social-links" style="display: flex; gap: 12px;
justify-content: center; padding: 40px;">
<a href="https://twitter.com" style="width: 48px; height: 48px;
display: flex; align-items: center; justify-content: center;
border-radius: 50%; background-color: rgba(255,255,255,0.06);
color: rgba(255,255,255,0.6); text-decoration: none;
font-size: 20px; transition: background-color 0.2s ease;">𝕏</a>
<a href="https://github.com" style="width: 48px; height: 48px;
display: flex; align-items: center; justify-content: center;
border-radius: 50%; background-color: rgba(255,255,255,0.06);
color: rgba(255,255,255,0.6); text-decoration: none;
font-size: 20px; transition: background-color 0.2s ease;">GH</a>
<a href="https://linkedin.com" style="width: 48px; height: 48px;
display: flex; align-items: center; justify-content: center;
border-radius: 50%; background-color: rgba(255,255,255,0.06);
color: rgba(255,255,255,0.6); text-decoration: none;
font-size: 20px; transition: background-color 0.2s ease;">in</a>
<a href="https://youtube.com" style="width: 48px; height: 48px;
display: flex; align-items: center; justify-content: center;
border-radius: 50%; background-color: rgba(255,255,255,0.06);
color: rgba(255,255,255,0.6); text-decoration: none;
font-size: 20px; transition: background-color 0.2s ease;">YT</a>
</div>
Result: Bricks Element Tree
div (social-links) — flex, gap:12px
├── button — "𝕏", 48×48, border-radius:50%, link to twitter
├── button — "GH", 48×48, border-radius:50%, link to github
├── button — "in", 48×48, border-radius:50%, link to linkedin
└── button — "YT", 48×48, border-radius:50%, link to youtube
social-links),
the class-hint maps it to a Bricks social-icons element. To keep manual button-based
social icons, avoid the word "social" in the class name.
Example 30: Sidebar with Widgets
Input HTML
<aside style="width: 300px; display: flex; flex-direction: column;
gap: 32px;">
<!-- Search Widget -->
<div style="background: rgba(255,255,255,0.04);
border-radius: 12px; padding: 24px;
border: 1px solid rgba(255,255,255,0.08);">
<h4 style="font-size: 16px; color: #fff; font-weight: 600;
margin-bottom: 16px;">Search</h4>
<div style="display: flex; gap: 8px;">
<input type="text" placeholder="Search..." style="
flex: 1; padding: 10px 14px; border-radius: 8px;
border: 1px solid rgba(255,255,255,0.1);
background: rgba(255,255,255,0.04);
color: #fff; font-size: 14px;" />
<button style="padding: 10px 16px; background: #6C5CE7;
color: #fff; border: none; border-radius: 8px;
font-size: 14px;">Go</button>
</div>
</div>
<!-- Categories Widget -->
<div style="background: rgba(255,255,255,0.04);
border-radius: 12px; padding: 24px;
border: 1px solid rgba(255,255,255,0.08);">
<h4 style="font-size: 16px; color: #fff; font-weight: 600;
margin-bottom: 16px;">Categories</h4>
<ul style="list-style: none; padding: 0; margin: 0;
display: flex; flex-direction: column; gap: 10px;">
<li><a href="#" style="font-size: 14px;
color: rgba(255,255,255,0.6);
text-decoration: none;">Tutorials (12)</a></li>
<li><a href="#" style="font-size: 14px;
color: rgba(255,255,255,0.6);
text-decoration: none;">Tips & Tricks (8)</a></li>
<li><a href="#" style="font-size: 14px;
color: rgba(255,255,255,0.6);
text-decoration: none;">Updates (5)</a></li>
<li><a href="#" style="font-size: 14px;
color: rgba(255,255,255,0.6);
text-decoration: none;">Guides (15)</a></li>
</ul>
</div>
<!-- Tags Widget -->
<div style="background: rgba(255,255,255,0.04);
border-radius: 12px; padding: 24px;
border: 1px solid rgba(255,255,255,0.08);">
<h4 style="font-size: 16px; color: #fff; font-weight: 600;
margin-bottom: 16px;">Popular Tags</h4>
<div style="display: flex; gap: 8px; flex-wrap: wrap;">
<span style="padding: 6px 14px; border-radius: 20px;
font-size: 13px; background: rgba(108,92,231,0.15);
color: #6C5CE7;">Bricks</span>
<span style="padding: 6px 14px; border-radius: 20px;
font-size: 13px; background: rgba(108,92,231,0.15);
color: #6C5CE7;">AI</span>
<span style="padding: 6px 14px; border-radius: 20px;
font-size: 13px; background: rgba(108,92,231,0.15);
color: #6C5CE7;">CSS</span>
<span style="padding: 6px 14px; border-radius: 20px;
font-size: 13px; background: rgba(108,92,231,0.15);
color: #6C5CE7;">WordPress</span>
<span style="padding: 6px 14px; border-radius: 20px;
font-size: 13px; background: rgba(108,92,231,0.15);
color: #6C5CE7;">Converter</span>
</div>
</div>
</aside>
Result: Bricks Element Tree
div (aside → block) — width:300px, flex column, gap:32px
├── block — search widget card
│ ├── heading h4 — "Search"
│ └── block — flex, gap:8px
│ ├── text-basic (input) — placeholder, flex:1
│ └── button — "Go"
├── block — categories widget card
│ ├── heading h4 — "Categories"
│ └── block (ul) — flex column, gap:10px
│ ├── block(li) > button — "Tutorials (12)"
│ ├── block(li) > button — "Tips & Tricks (8)"
│ └── ...
└── block — tags widget card
├── heading h4 — "Popular Tags"
└── block — flex, flex-wrap:wrap, gap:8px
├── text-basic — "Bricks" pill
├── text-basic — "AI" pill
└── ...
Example 31: Tab Layout
Input HTML
<div class="tabs" style="max-width: 700px; margin: 0 auto;">
<div class="tab-nav" style="display: flex;
border-bottom: 2px solid rgba(255,255,255,0.08);">
<button class="tab-btn active" style="padding: 14px 24px;
border: none; background: none; color: #6C5CE7;
font-size: 15px; font-weight: 600;
border-bottom: 2px solid #6C5CE7;
margin-bottom: -2px;">Overview</button>
<button class="tab-btn" style="padding: 14px 24px;
border: none; background: none;
color: rgba(255,255,255,0.5);
font-size: 15px; font-weight: 500;">Features</button>
<button class="tab-btn" style="padding: 14px 24px;
border: none; background: none;
color: rgba(255,255,255,0.5);
font-size: 15px; font-weight: 500;">Reviews</button>
</div>
<div class="tab-content" style="padding: 32px 0;">
<h3 style="font-size: 22px; color: #fff; font-weight: 600;
margin-bottom: 12px;">Product Overview</h3>
<p style="font-size: 15px; color: rgba(255,255,255,0.65);
line-height: 1.8;">This is the overview panel content.
It shows general information about the product, its features,
and how to get started.</p>
</div>
</div>
Result: Bricks Element Tree
tabs-nested (class "tabs" triggers class-hint!)
├── block (tab-nav) — flex, border-bottom
│ ├── button — "Overview" (active state via border-bottom)
│ ├── button — "Features"
│ └── button — "Reviews"
└── block (tab-content) — padding:32px 0
├── heading h3 — "Product Overview"
└── text-basic — content paragraph
class="tabs" maps to tabs-nested.
The tab buttons will need JS interactivity added manually in Bricks after conversion.
Example 32: Modal / Popup
Input HTML
<div class="modal-overlay" style="
position: fixed; top: 0; left: 0; right: 0; bottom: 0;
background-color: rgba(0,0,0,0.6);
display: flex; align-items: center; justify-content: center;
z-index: 1000;">
<div class="modal-content" style="
width: 500px; background-color: #1a1a2e;
border-radius: 20px; padding: 40px;
border: 1px solid rgba(255,255,255,0.1);
position: relative;">
<button style="position: absolute; top: 16px; right: 16px;
background: none; border: none; color: rgba(255,255,255,0.4);
font-size: 24px; cursor: pointer;">×</button>
<h2 style="font-size: 24px; color: #fff; font-weight: 700;
margin-bottom: 12px;">Subscribe Now</h2>
<p style="font-size: 15px; color: rgba(255,255,255,0.6);
line-height: 1.6; margin-bottom: 24px;">
Get 20% off your first month. Enter your email to continue.
</p>
<div style="display: flex; gap: 10px;">
<input type="email" placeholder="[email protected]"
style="flex: 1; padding: 12px 16px; border-radius: 10px;
border: 1px solid rgba(255,255,255,0.1);
background: rgba(255,255,255,0.05);
color: #fff; font-size: 14px;" />
<button style="padding: 12px 24px; background: #6C5CE7;
color: #fff; border: none; border-radius: 10px;
font-weight: 600;">Subscribe</button>
</div>
</div>
</div>
Result: Bricks Element Tree
offcanvas (class "modal" triggers class-hint → offcanvas)
└── block (modal-content) — 500px, bg:#1a1a2e, rounded
├── button — "×" close, position:absolute top-right
├── heading h2 — "Subscribe Now"
├── text-basic — description
└── block — flex, gap:10px
├── text-basic (input) — email field
└── button — "Subscribe"
Key Mappings
| CSS Input | Bricks Output |
|---|---|
position: fixed; | _position: "fixed" |
z-index: 1000; | _zIndex: 1000 |
class="modal-overlay" | Triggers offcanvas class-hint (contains "modal") |
Example 33: Cookie Notice Banner
Input HTML
<div class="cookie-banner" style="
position: fixed; bottom: 0; left: 0; right: 0;
background-color: #1a1a2e;
padding: 20px 40px;
display: flex; align-items: center;
justify-content: space-between; gap: 24px;
border-top: 1px solid rgba(255,255,255,0.08);
z-index: 999;">
<p style="font-size: 14px; color: rgba(255,255,255,0.7);
margin: 0; flex: 1;">
We use cookies to enhance your experience. By continuing to visit
this site you agree to our use of cookies.
<a href="/privacy" style="color: #6C5CE7;
text-decoration: none;">Learn more</a>
</p>
<div style="display: flex; gap: 10px;">
<button style="padding: 10px 20px; background: transparent;
border: 1px solid rgba(255,255,255,0.2); color: #fff;
border-radius: 8px; font-size: 14px;">Decline</button>
<button style="padding: 10px 20px; background: #6C5CE7;
border: none; color: #fff; border-radius: 8px;
font-size: 14px; font-weight: 600;">Accept</button>
</div>
</div>
Result: Bricks Element Tree
div (cookie-banner) — position:fixed, bottom:0, z-index:999
├── text-basic — cookie message with inline "Learn more" link
└── block — flex, gap:10px
├── button — "Decline", outline style
└── button — "Accept", bg:#6C5CE7
Example 34: Dashboard Stats
Input HTML
<section style="padding: 40px; background-color: #0f0f23;">
<div style="display: grid; grid-template-columns: repeat(4, 1fr);
gap: 20px; max-width: 1200px; margin: 0 auto;">
<div style="background: rgba(255,255,255,0.04);
border-radius: 14px; padding: 28px;
border: 1px solid rgba(255,255,255,0.06);">
<p style="font-size: 13px; color: rgba(255,255,255,0.45);
margin-bottom: 8px; text-transform: uppercase;
letter-spacing: 1px;">Total Users</p>
<p style="font-size: 32px; font-weight: 700;
color: #fff; margin-bottom: 4px;">12,847</p>
<p style="font-size: 13px; color: #2ecc71;">↑ 12.5% this month</p>
</div>
<div style="background: rgba(255,255,255,0.04);
border-radius: 14px; padding: 28px;
border: 1px solid rgba(255,255,255,0.06);">
<p style="font-size: 13px; color: rgba(255,255,255,0.45);
margin-bottom: 8px; text-transform: uppercase;
letter-spacing: 1px;">Revenue</p>
<p style="font-size: 32px; font-weight: 700;
color: #fff; margin-bottom: 4px;">$48,290</p>
<p style="font-size: 13px; color: #2ecc71;">↑ 8.2% this month</p>
</div>
<div style="background: rgba(255,255,255,0.04);
border-radius: 14px; padding: 28px;
border: 1px solid rgba(255,255,255,0.06);">
<p style="font-size: 13px; color: rgba(255,255,255,0.45);
margin-bottom: 8px; text-transform: uppercase;
letter-spacing: 1px;">Conversions</p>
<p style="font-size: 32px; font-weight: 700;
color: #fff; margin-bottom: 4px;">3,492</p>
<p style="font-size: 13px; color: #e74c3c;">↓ 2.1% this month</p>
</div>
<div style="background: rgba(255,255,255,0.04);
border-radius: 14px; padding: 28px;
border: 1px solid rgba(255,255,255,0.06);">
<p style="font-size: 13px; color: rgba(255,255,255,0.45);
margin-bottom: 8px; text-transform: uppercase;
letter-spacing: 1px;">Active Plans</p>
<p style="font-size: 32px; font-weight: 700;
color: #fff; margin-bottom: 4px;">891</p>
<p style="font-size: 13px; color: #2ecc71;">↑ 5.7% this month</p>
</div>
</div>
</section>
Result: Bricks Element Tree
section
└── block — display:grid, 4 columns, gap:20px
├── block — stat card
│ ├── text-basic — "Total Users" (uppercase)
│ ├── text-basic — "12,847" (large, bold)
│ └── text-basic — "↑ 12.5%", color:#2ecc71
├── block — "Revenue" card ...
├── block — "Conversions" card (color:#e74c3c for down)
└── block — "Active Plans" card ...
Example 35: Masonry Gallery with JS
Input HTML
<section style="padding: 80px 40px; background-color: #0a0a1a;">
<h2 style="text-align: center; font-size: 36px; color: #fff;
font-weight: 700; margin-bottom: 48px;">Gallery</h2>
<div class="masonry-grid" style="max-width: 1200px; margin: 0 auto;
column-count: 3; column-gap: 16px;">
<div style="break-inside: avoid; margin-bottom: 16px;">
<img src="https://example.com/img1.jpg" alt="Photo 1"
style="width: 100%; border-radius: 12px;
display: block;" />
</div>
<div style="break-inside: avoid; margin-bottom: 16px;">
<img src="https://example.com/img2.jpg" alt="Photo 2"
style="width: 100%; border-radius: 12px;
display: block;" />
</div>
<div style="break-inside: avoid; margin-bottom: 16px;">
<img src="https://example.com/img3.jpg" alt="Photo 3"
style="width: 100%; border-radius: 12px;
display: block;" />
</div>
<div style="break-inside: avoid; margin-bottom: 16px;">
<img src="https://example.com/img4.jpg" alt="Photo 4"
style="width: 100%; border-radius: 12px;
display: block;" />
</div>
<div style="break-inside: avoid; margin-bottom: 16px;">
<img src="https://example.com/img5.jpg" alt="Photo 5"
style="width: 100%; border-radius: 12px;
display: block;" />
</div>
<div style="break-inside: avoid; margin-bottom: 16px;">
<img src="https://example.com/img6.jpg" alt="Photo 6"
style="width: 100%; border-radius: 12px;
display: block;" />
</div>
</div>
</section>
<script>
// Lightbox functionality
document.querySelectorAll('.masonry-grid img').forEach(img => {
img.style.cursor = 'pointer';
img.addEventListener('click', () => {
const overlay = document.createElement('div');
overlay.style.cssText = 'position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.9);display:flex;align-items:center;justify-content:center;z-index:9999;cursor:pointer;';
const clone = img.cloneNode();
clone.style.cssText = 'max-width:90vw;max-height:90vh;object-fit:contain;border-radius:8px;';
overlay.appendChild(clone);
overlay.addEventListener('click', () => overlay.remove());
document.body.appendChild(overlay);
});
});
</script>
Result: Bricks Element Tree
section
├── heading h2 — "Gallery"
├── block (masonry-grid) — column-count/gap go to _cssCustom
│ ├── block — break-inside:avoid → _cssCustom
│ │ └── image — img1.jpg, width:100%, border-radius:12px
│ ├── block ...
│ └── (6 total image cards)
└── code — <script>...lightbox script...</script>
Key Mappings
| CSS Input | Bricks Output |
|---|---|
column-count: 3; | _cssCustom: "%root% { column-count: 3; }" |
column-gap: 16px; | _cssCustom: "%root% { column-gap: 16px; }" |
break-inside: avoid; | _cssCustom: "%root% { break-inside: avoid; }" |
<script>...</script> | Code element with executeCode: true |
column-count, column-gap,
break-inside) don't have Bricks GUI equivalents and go to _cssCustom.
The <script> tag is extracted and placed in a separate Code element with
executeCode: true so the lightbox JS runs on the frontend.
Unmapped CSS & _cssCustom
Any CSS property that doesn't have a direct Bricks GUI equivalent is automatically preserved
in the element's _cssCustom field using the %root% selector (which Bricks
replaces with the element's own selector at render time).
Properties That Go to _cssCustom
- Grid properties:
grid-template-columns,grid-template-rows,grid-column,grid-row flex-basis,overflow-x,overflow-y,visibilitycursor,pointer-events,object-positionlist-style,list-style-typebackdrop-filter- Complex transforms:
matrix(),translate3d(),perspective() - Any CSS property not in the 80+ mappable list
Example
/* Input CSS */
.my-element {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 24px;
backdrop-filter: blur(10px);
cursor: pointer;
}
/* Bricks output */
{
"_display": "grid",
"_flexbox": { "gap": "24px" },
"_cssCustom": "%root% { grid-template-columns: repeat(3, 1fr); }\n%root% { backdrop-filter: blur(10px); }\n%root% { cursor: pointer; }"
}
The %root% selector ensures unmapped styles are scoped to the correct element
in all Bricks breakpoints.
Limitations & Edge Cases
Known Limitations
- Pseudo-elements (
::before,::after) — not mapped to Bricks GUI. Use_cssCustomor a Code element. - Hover/focus states in CSS — pseudo-class selectors like
:hoverare preserved in_cssCustombut not mapped to Bricks' separate hover state UI. - Media queries — not automatically split into Bricks breakpoints. They are preserved as-is in
_cssCustom. - Complex selectors — only simple class selectors (
.class-name) are matched. Combinators like.parent > .childare not applied to specific elements. - CSS variables — custom properties (
var(--color-primary)) are passed through as-is. If Bricks can resolve them at render time, they'll work. - Tables — complex tables are preserved as raw HTML inside a Code/HTML element rather than broken into individual Bricks elements.
- Cubic-bezier transitions — space-based parsing may split complex timing functions incorrectly. Use
_cssCustomfor precise control.
Best Practices
- Use inline styles for most accurate mapping — they're applied directly to the correct element.
- Keep CSS selectors simple — use single class selectors for best selector-to-element matching.
- Include all CSS — paste both HTML and CSS for complete style mapping. Embedded
<style>blocks in the HTML are automatically extracted. - Section-level HTML gives better results than full pages — convert one section at a time for cleaner output.
- Review
_cssCustomafter conversion — move important unmapped styles into Bricks' GUI controls if needed.