About this set
Pricing tables with a billing period switch that changes every price on the page without any JavaScript. Monthly or yearly, three plans is a project management tool with Basic, Team and Business cards and a two-option segmented control above them; choosing Yearly swaps each price to its discounted monthly rate and replaces the note under it with what is billed and what you save, such as Billed $240 a year. You save $60. A line under the switch states the saving in words, so it never depends on the Save 20% chip alone. Three billing periods, wide rows is a static hosting service with Monthly, Quarterly and Yearly options and two plans laid out as wide rows, with the features on the left and the price block on the right; on phones the switch becomes three equal columns with the saving under each label. The switch is a fieldset of radio buttons with a visually hidden legend, and the prices change through the :has() selector: the card container checks which radio is selected and shows the matching price and note. In Bootstrap the options are .btn-check buttons.
What’s included
- Monthly and yearly, or monthly, quarterly and yearly billing switches
- Prices and billing notes switch with :has(), no JavaScript
- The saving is stated in text under the switch and under every price
- A real radio group in a fieldset, so arrow keys move between periods
- Bootstrap version uses .btn-check, .badge, .card and .btn
Accessibility
The billing switch is a fieldset of native radio buttons with a Billing period legend, so screen readers announce the group and the selected option and the arrow keys change it. Hidden prices use display: none, so only the price on screen is read. The focused option gets a 2px outline on the visible pill, and the price fade-in animation and colour transitions stop under prefers-reduced-motion.
Customise it
Change --bt-accent, --bt-chip and --bt-radius on .bt for colour and shape, and edit the .bt-m, .bt-q and .bt-y spans for your own prices. In Tailwind the switch is driven by group-has-[[value=yearly]:checked]/bt variants on each price.






