CSS variables and styling
Keep your custom markup in sync with the Design tab's colors, sizes, and radii.
Three things work in your favor when styling a custom template.
1. Keep the root class
Each template lists a root class in The five templates — for example oxify-bb-product-card. Keep it on your outermost element and the built-in styles that hang off it keep working, along with any Custom CSS you wrote against that class.
| Template | Root class | What keeping it gives your markup |
|---|---|---|
| Product card | oxify-bb-product-card | The card background, border, and corner radius from Product Card Template, laid out as a full-width column. |
| Category tabs | oxify-bb-tabs | The scrollable row of tabs. Add data-alignment={props.alignment} to honor Tab Button Alignment, and give each button oxify-bb-tab (plus active on the selected one) for the tab colors and borders. |
| Sidebar | oxify-bb-kit-sidebar | The panel background, border, radius, and padding from Sidebar Widget. Inside an oxify-bundle-builder-layout wrapper it's also the sticky column — see Full layout. |
| Toast | oxify-bb-toast and oxify-bb-toast-content | oxify-bb-toast pins the message to the bottom of the screen and slides it in; oxify-bb-toast-content is the visible bubble, with the merchant's toast colors and text size. |
2. Use the CSS variables
Most of the colors, sizes, and radii a merchant picks on the Design tab are exposed as CSS variables on the builder's container (oxify-bundle-builder-container), so your markup can follow those settings automatically instead of hard-coding values that go stale the moment someone changes a color:
The full set follows the pattern --oxify-bb-*. To see every variable the builder sets, inspect the oxify-bundle-builder-container element in your browser's dev tools — they're listed in its style attribute. The ones you'll reach for most:
| Comes from | Variables |
|---|---|
| Product Card Template colors | --oxify-bb-card-bg, --oxify-bb-card-border, --oxify-bb-card-text, --oxify-bb-card-price |
| Product Card Template border | --oxify-bb-product-card-border-radius, --oxify-bb-product-card-border-width |
| Product Card Template typography | --oxify-bb-product-title-size, --oxify-bb-product-title-weight, --oxify-bb-product-price-size, --oxify-bb-product-price-weight |
| Product Card Template → Button Customization | --oxify-bb-add-kit-btn-bg, --oxify-bb-add-kit-btn-text, --oxify-bb-add-kit-btn-border, --oxify-bb-add-kit-btn-border-radius, --oxify-bb-add-kit-btn-border-width, --oxify-bb-button-text-size, --oxify-bb-button-text-weight |
| Product Card Template → Quantity Selector | --oxify-bb-product-cart-1-qty-bg, --oxify-bb-product-cart-1-qty-text, --oxify-bb-product-cart-1-qty-border, --oxify-bb-product-cart-1-qty-border-radius, --oxify-bb-product-cart-1-qty-border-width |
| Tab Button Template colors | --oxify-bb-tab-bg, --oxify-bb-tab-text, --oxify-bb-tab-selected-bg, --oxify-bb-tab-selected-text, --oxify-bb-tab-border, --oxify-bb-tab-selected-border |
| Tab Button Template border and typography | --oxify-bb-tab-border-radius, --oxify-bb-tab-border-width, --oxify-bb-tab-text-size, --oxify-bb-tab-text-weight |
| Category Title settings (inside Tab Button Template) | --oxify-bb-category-title-color, --oxify-bb-category-title-size, --oxify-bb-category-title-weight, --oxify-bb-category-title-alignment |
| Sidebar Widget colors and Sidebar Width | --oxify-bb-sidebar-bg, --oxify-bb-sidebar-border, --oxify-bb-sidebar-title, --oxify-bb-sidebar-price, --oxify-bb-sidebar-item-text, --oxify-bb-sidebar-width |
| Sidebar Widget → Sidebar Border Radius and Sidebar Border Width | --oxify-bb-kit-sidebar-border-radius, --oxify-bb-kit-sidebar-border-width |
| Sidebar Widget → Item Cards | --oxify-bb-kit-item-card-border-radius, --oxify-bb-kit-item-card-border-width |
| Sidebar Widget typography | --oxify-bb-kit-title-size, --oxify-bb-kit-title-weight, --oxify-bb-kit-price-size, --oxify-bb-kit-price-weight, --oxify-bb-kit-item-text-size, --oxify-bb-kit-item-text-weight, --oxify-bb-instruction-text-color, --oxify-bb-instruction-text-size, --oxify-bb-instruction-text-weight |
| Sidebar Widget → Add to Cart Button | --oxify-bb-add-cart-btn-bg, --oxify-bb-add-cart-btn-text, --oxify-bb-add-cart-btn-disabled-bg, --oxify-bb-add-cart-btn-disabled-text, --oxify-bb-add-cart-btn-border-radius |
| Sidebar Widget → Discount Badge and Box Selector Tabs | --oxify-bb-box-tab-badge-bg, --oxify-bb-box-tab-badge-text, --oxify-bb-box-selector-tabs-bg, --oxify-bb-box-selector-tab-text, --oxify-bb-box-selector-tab-active-bg, --oxify-bb-box-selector-tab-active-text |
| Add to Cart Message settings | --oxify-bb-toast-background-color, --oxify-bb-toast-text-color, --oxify-bb-toast-font-size, --oxify-bb-toast-font-weight |
| Built-in sizing — no Design-tab setting (8px and 16px unless the builder stores other values) | --oxify-bb-corner-radius, --oxify-bb-spacing |
Colors come through as rgba(…) values and sizes include their unit, so you can drop a variable straight into a style.
3. Add your own CSS in the Custom CSS card
For anything beyond what a variable covers, give your elements their own class names and style them in the Custom CSS Settings card on the same Design tab — click Add custom CSS if you don't see it, and make sure its switch is on. That keeps your JSX markup readable instead of full of inline styles.
Inner classes worth reusing
The starting templates are built from the app's own classes, which is why "Reset to default" gives you something that already looks right. You can reuse them in your own markup to pick up the same styling:
| Template | Classes the starting template uses |
|---|---|
| Product card | oxify-bb-product-image, oxify-bb-product-info, oxify-bb-product-title, oxify-bb-product-price, oxify-bb-compare-price, oxify-bb-product-controls, oxify-bb-qty-selector, oxify-bb-qty-btn, oxify-bb-qty-value, oxify-bb-add-btn-base oxify-bb-add-to-kit-btn |
| Sidebar | oxify-bb-kit-header, oxify-bb-kit-title, oxify-bb-kit-price, oxify-bb-box-selector, oxify-bb-items-count, oxify-bb-instruction-text, oxify-bb-kit-items, oxify-bb-kit-item, oxify-bb-kit-item-image, oxify-bb-kit-item-details, oxify-bb-kit-item-title, oxify-bb-kit-item-remove, oxify-bb-empty-kit, oxify-bb-sidebar-add-to-cart-btn-base oxify-bb-add-to-cart-btn |
| Full layout | oxify-bundle-builder-layout, oxify-bb-products-section (plus the unstyled oxify-bb-layout-root wrapper) |
| Category heading | oxify-bb-category-heading — a heading that spans every column of the products grid; see Recipes |
Fonts, images, and icons
| Asset | How to add it |
|---|---|
| Images and icons | Reference any URL directly in an <img src="…">. |
| Custom fonts | Load them via Custom CSS Settings with @font-face or @import. |
Does this slow the storefront down?
The compiler never reaches the storefront. It only runs in the admin, when you click Compile or switch a template on. Your storefront receives the already-compiled result — shoppers don't download the code editor, the compiler, or your original JSX. Because the compiled code travels with the builder's settings, keeping templates compact is worthwhile.
Do the Design-tab settings still work?
Yes, as long as you keep the root class and use the --oxify-bb-* variables. Merchant-set text reaches your template through props: button labels, the sidebar title, the instruction text and empty-kit text (with tokens like {maxItems} already filled in), the toast message, and the savings badge text through props.getBoxBadgeText.