Vibary.ai
← Vibe Coding

Monthly Yearly Toggle

Switching the billing period slides one thumb and rolls every plan price together.

commercepremiumenergeticinteraction · finite · intermediate · ~0.6s
Interactive · click to play
Variant

The animated component in this preview is rendered from the canonical file shown here. The surrounding demo shell only provides context and is not part of the copied code.

345 lines · react + motion only
import { useId, useState } from "react";
import { AnimatePresence, motion, useReducedMotion } from "motion/react";

/**
 * Vibary · Monthly Yearly Toggle
 *
 * Switching the billing period moves one thumb across the control and
 * rolls every price on the page at the same instant, so the plans stay

About this pattern

Plans are only comparable if they change together. One thumb slides across the period control on a shared layout animation, and every price rolls in the same direction on the same beat — a short cascade down the list, at one constant type size — so the reader is never comparing a settled number against a moving one. The savings badge arrives a beat after the prices have landed, which is the only order in which it can be read. Nothing scales: a price that grows to make a point is a price nobody trusts.

Pricing page billing periodSubscription upgrade screenAnnual versus monthly comparisonSeat pricing with a term discount

Where it shows up

Screens we drew to show where this motion usually sits. Illustrations, not captures of any product.

  • BillingLast 30 days
    Invoice 4821$169.65Paid
    Invoice 4809$412.00Paid
    Invoice 4794$88.20Due Jun 30
    Invoice 4780$1,204.00Paid
    Billing page

    A period control above the plan columns restates every seat price at once.

Related patterns