Pricing Package Picker
This article documents
Pricing Package Picker Pro
A framed panel with service notes on the left and a package selector on the right: the chosen package lights up and opens its button.
Requires: nothing. The switching is done with native Bricks Interactions and a few lines of CSS on the section’s class, so the template needs no companion script and no library.
How it works#
- The packages sit in
Packages (radio group). EachPackageis a radio (role="radio",tabindex="0") with four interactions, two on click and two on focus: setaria-checkedto false on every package, then to true on itself. The click interactions keep the browser’s default action, so the button inside still follows its link. - The package with
aria-checked="true"gets a darker border and a white background, shows its round check mark and opens its button: theButton revealgrows from 0 to 80px in 0.3s (ease-out) while the button fades in over 0.3s. - On load the first package is chosen (its Attributes). Move
aria-checked="true"to another package to change that.
What you replace#
| In the structure panel | What to do |
|---|---|
Group - ... (3) | Eyebrow, title and text; the links inside the text are ordinary HTML links |
Package - ... (3) | Name, subtitle, amount, the two highlights, the features and the button; also update the aria-label attribute |
Features | Duplicate or delete an Item; they flow into two columns |
To add a package: duplicate one and set its aria-checked attribute to false. Its interactions already target every package in the group.
Layout and breakpoints#
Two columns with a 48px gap above 991px, one column at 991px. The inner padding is 24px, 16px at 767px. Highlights and features run in two columns, one at 478px.
Classes#
Global classes with typed settings: bxp38-eyebrow, bxp38-title, bxp38-text, bxp38-divider, bxp38-card, bxp38-separator, bxp38-grid, bxp38-item, bxp38-icon, bxp38-item-text, bxp38-mark, bxp38-btn-primary. The section class bsfy-p38 holds only the chosen state (border, check mark, button reveal), the link hover, the focus ring and reduced motion; the reveal wrapper carries the plain class bxp38-cta.
Reduced motion and without JavaScript#
With reduced motion the button opens without animating. Without JavaScript the first package stays chosen with its button visible.