Guides

Theme setup & styling

Placing and styling the bundle block in your theme.

Placing the block

Product offers show through the TB Bundles app embed on the products they target, so you don't always need a block. A Build Your Own box needs the Build Your Own block on a page template or the home page.

Block settings

The TB Bundles and Build Your Own blocks have one setting, Bundle handle. Leave it blank and the block finds the linked active offer. Enter a handle to show one specific offer, for example when you have more than one builder. Text, layout and colors are set in the app.

Layouts per bundle type

  • Fixed sets: Included list, or Kit with options.
  • Volume and BOGO: Stacked offers, Compact rows or Side by side. Volume also has a Wholesale table.
  • Mix and match: Fill the slots, or One group at a time.
  • Build your own: Grid and summary, or Simple list. Products can also show as a single row.

Pick the layout under Page arrangement on the offer's Look tab. The Design page sets colors, corner radius, type and badge position for every offer, and an offer's Look tab can override them.

Match my theme colors

Match my theme colors is on by default. The widget reads your theme's colors and takes its background from the surface it sits on, so inside a white card on a tinted page it is white. If nothing around it has a color, it uses the theme's page background.

To give one section its own look, set a --sb- color such as --sb-accent on an element around the widget. The widget uses it in place of the color it detected. Colors set on the offer itself still win.

Advanced styling

The widget has CSS custom properties you can set from your theme's custom CSS. Colors that Match my theme, Design or an offer sets are written on the widget itself, so add !important to override those from a smart-bundle rule, or set them on an element around the widget as described above.

CSS custom properties
smart-bundle {
  --sb-accent: #008060;   /* buttons, selected states */
  --sb-text: #202223;     /* primary text */
  --sb-border: #e1e3e5;   /* card borders */
  --sb-badge-bg: #d4edda; /* savings badge background */
  --sb-badge-text: #155724;
  --sb-radius: 8px;       /* card corner radius */
  --sb-btn-radius: 999px; /* button corner radius */

  /* Build Your Own size chips */
  --sb-pack-bg: #ffffff;
  --sb-pack-text: #202223;
  --sb-pack-border: #d8d8d8;
  --sb-pack-selected-bg: #008060;
  --sb-pack-selected-text: #ffffff;
  --sb-pack-selected-border: #008060;

  /* Theme hooks: the app leaves these unset. Example values: */
  --sb-font-family: inherit;         /* widget font */
  --sb-heading-font-family: inherit; /* heading font */
  --sb-hover-border: #8c9196;        /* card and size chip border on hover */
  --sb-hover-shadow: none;           /* card shadow on hover */
  --sb-selected-border: #008060;     /* selected card and size chip */
  --sb-selected-ring: none;          /* selected card ring */
  --sb-selected-item-bg: #f1f8f5;    /* selected card background */
  --sb-btn-hover-bg: #006e52;        /* add to cart on hover */
  --sb-btn-hover-text: #ffffff;
  --sb-disabled-bg: #e1e3e5;         /* add to cart while disabled */
  --sb-disabled-text: #8c9196;
}