Monthly yearly pricing toggleYear View Pricing

Monthly yearly pricing toggle: twelve month blocks under each price; switching to yearly turns the last ones into free months.

Features

  • A monthly or yearly switch that names the saving: "2 months free"
  • Twelve month blocks under each plan's price
  • On yearly, the last months turn into "Free" one after another
  • A plain line under the blocks: what you pay and what you keep
  • No animation library: colour transitions only, off for reduced motion

Best for: Subscriptions that offer a yearly discount and want it understood at a glance.

Installation

npm install clsx tailwind-merge

Then copy the files from the Code tab into the same paths in your project, in TypeScript or JavaScript.

Props

PropTypeDefaultDescription
titleReactNode-The section's headline.
subtitleReactNode-One grey line under it.
plansYearPlan[]-id, name, blurb, monthly price, features, cta, isFeatured.
freeMonthsnumber2Months free when paid yearly.
classNamestring-Extra classes for the section.

FAQ

Is the Year View Pricing free to use?

Yes. Year View Pricing is free to copy into your own projects. Open the Code tab and paste the files into your app.

Does Year View Pricing work with Next.js and React?

Yes. It's a React client component made for the Next.js App Router, styled with Tailwind CSS and animated with Framer Motion (the motion package).

Can I use Year View Pricing in JavaScript instead of TypeScript?

Yes. Every file comes in TypeScript and JavaScript. Switch the language in the Code tab.

What does Year View Pricing need installed?

clsx, tailwind-merge, plus the shared helpers from the Installation page.

Is Year View Pricing accessible?

Every link and button is reachable by keyboard with a visible focus ring, and the animation stays still for visitors who ask for reduced motion.