shadcn.io is not affiliated with official shadcn/ui
Dialog examples · Standard
Plan Selection Dialog for React
A plan selection dialog with three plan cards, a list of included features and a Continue button named after the chosen plan.
Comparing plans shouldn't take a long pricing page. This React dialog shows three plans as radio cards, the features included, and a Continue button that names the plan picked. It's shadcn.io's Dialog on Base UI with a Radio Group of Field cards.
Preview
Installation
FAQ
How are the plan cards built?
Each is a FieldLabel around a horizontal Field with the name, price, description and a RadioGroupItem. The radio group is controlled, starts on Pro, and lays the cards out with sm:grid-cols-3.
How does the button know the plan?
It looks up the selected value in the static plans list and shows its name: Continue with Pro.
Should the features change with the plan?
If plans differ, yes: keep a feature list per plan and show the selected one's, or mark features missing from it.
Should I highlight a recommended plan?
Add a Badge such as Popular to that card. Preselecting it, as the demo does with Pro, also nudges people.
Can I add a monthly or yearly toggle?
Yes, with a Switch or a second radio group above the cards that changes the prices, as the Checkout dialog example does.
Related
- Checkout DialogA checkout dialog with a billing cycle
- Standard DialogA share dialog with a read-only link, a
- Button with Text (Standard)The one filled action
- Signup Form DialogA sign-up dialog with name, email and
- Card Details DialogA payment card dialog with cardholder
- Badge with Text (Standard)A default badge with a short label for a