motionsnack

Animated React sections that already feel finished.

Copy them into Next.js or add them with one command. Plain React and Tailwind, light and dark.

New sections, once a month

One short email when something new lands. No spam.

Library

  • Sections
  • Blocks
  • Components
  • Application UI
  • Templates

Popular

  • Hero
  • Gallery
  • Testimonials
  • Stats
  • Logos
  • FAQ

Resources

  • Installation
  • All components
  • All blocks
  • All sections
  • All application UI
  • Design system
  • Changelog
  • Pricing

Company

  • About
  • Contact
  • Terms
  • Privacy

Install

npx motionsnack add <name>Step-by-step guidehello@motionsnack.dev
Kuba Šťastný@kubastastnydev

© 2026 motionsnack. All rights reserved.

TermsPrivacy

motionsnack

motionsnack
DocsSectionsTemplatesWhat's newPricing
Get lifetime access
  1. Home
  2. Docs
  3. Components
  4. Switch
  5. Billing Switch
ComponentsBlocksSectionsApplication UI
ComponentsBlocksSectionsApplication UI

Accordion

  • Spring Accordion

Alert

  • Glow Alert

Audio

  • Podcast PlayerNew
  • Voice NoteNew
  • Voice RecorderNew

Avatar

  • Avatar Stack

Badge

  • Pulse Badge

Breadcrumb

  • Slide Breadcrumb

Button

  • Chip ButtonNew
  • Glow Border Button
  • Glow ButtonNew
  • Plain ButtonNew

Calendar

  • Month Calendar

Checkbox

  • Checkbox CardsNew
  • Checkbox GroupNew
  • Chip CheckboxNew

Cropper

  • Image Cropper

Dialog

  • Spring Dialog

Dropdown

  • Command MenuNew
  • Stagger Dropdown
  • Switcher DropdownNew

File Upload

  • Drop Zone Upload

Input

  • Addon InputNew
  • Button InputNew
  • Copy InputNew
  • Date InputNew
  • Floating Label Input
  • Joined InputsNew
  • Notched Label InputNew
  • Number StepperNew
  • OTP InputNew
  • Password InputNew
  • Phone InputNew
  • Range InputNew
  • Search InputNew
  • Tag InputNew
  • Text FieldNew

Loader

  • Curtain LoaderNew
  • Greeting LoaderNew
  • Line LoaderNew
  • Meter LoaderNew
  • Split LoaderNew

Navigation Menu

  • Mobile Tab BarNew

Notification

  • Notification BellNew
  • Toast Stack

Pagination

  • Sliding Pagination

Popover

  • Spring Popover

Radio

  • Card Radio Group
  • Payment MethodNew
  • Radio GroupNew
  • Rating RadioNew

Select

  • ComboboxNew
  • Glide Select
  • Multi SelectNew
  • Rich SelectNew
  • Select FieldNew
  • Tree SelectNew

Sidebar

  • Icon RailNew

Slider

  • Glow Slider

Stepper

  • Progress Stepper

Switch

  • Billing SwitchNew
  • Switch RowNew
  • Toggle SwitchNew

Table

  • Sortable Table

Tabs

  • Sliding Tabs

Textarea

  • Auto Grow Textarea

Toggle

  • Icon ToggleNew
  • Theme ToggleNew
  • Toggle GroupNew

Tooltip

  • Follow Tooltip

Switch

Billing Switch

New

The Monthly / Yearly switch for pricing pages, as a segmented pill or two labels around a switch, with a savings badge.

npx motionsnack add billing-switch

Customize

<BillingSwitch />

Props

12 properties

PropertyTypeDefaultDescription
value'monthly' | 'yearly'-Controlled period.
defaultValue'monthly' | 'yearly''yearly'Period on first render when uncontrolled.
onChange(value: 'monthly' | 'yearly') => void-Called with the new period.
namestring-Name submitted with a form.
variant'segmented' | 'switch''segmented'Deprecated: 'switch' renders the same segmented control.
size'sm' | 'md''md'Deprecated: segmented controls are 48 only; both values render 48.
classNamestring''Extra classes on the wrapper.
monthlyLabelstring'Monthly'Text of the monthly option.
yearlyLabelstring'Yearly'Text of the yearly option.
badgestring'Save 20%'Small badge next to the yearly option. Empty hides it.
ariaLabelstring'Billing period'Name of the control for screen readers.
disabledbooleanfalseDisables the control.

About Billing Switch

Billing Switch is the small control every pricing page needs. As a segmented pill, a black or white thumb slides between Monthly and Yearly and inverts the chosen label; as a switch, the two words sit on either side of the library's switch and either word can be clicked. A small outlined badge such as Save 20% sits next to the yearly option and pops up to full strength when yearly is chosen, waiting dimmed otherwise. The pill is built on two native radios and the switch on a checkbox with the switch role, so keyboard, forms and screen readers work as expected, and keyboard focus shows the library's soft outline. Labels and the badge are props, in two sizes.

What's included

  • Segmented pill with a sliding thumb
  • Or two labels around a switch
  • Savings badge that pops in for yearly
  • Native radios or a switch underneath
  • Clickable labels and keyboard support
  • Two sizes, every text as a prop
  • Light and dark look
Type
Animated React switch component
Library
Components · Switch
Stack
Next.js, React, Tailwind CSS
Added
2026-11-23
Install
npx motionsnack add billing-switch