Modern pricing grid with animated sliding numbers, yearly billing toggle, and featured plan corner decorations.
Installation
Usage
Note: This component is inspired from Efferd.
How It Works
- Uses
motion/reactsprings andreact-use-measureto animate individual digit slots in theSlidingNumbercomponent, so price transitions feel physical and smooth when toggling billing period. - A custom
BillingToggleswitch (role="switch") controls theyearlystate, which swaps each plan'smonthlyvsyearlyprice. - The featured column receives
CornerPlusSVG decorations at its four corners, rendered viatranslateoffsets on the shared border grid. - Feature check icons use
@hugeicons/react(CheckmarkBadge01Icon).
API Reference
Pricing1
| Prop | Type | Default |
|---|---|---|
plans? | Plan[] | DEFAULT_PLANS |
Plan
| Prop | Type | Default |
|---|---|---|
id? | string | - |
name? | string | - |
desc? | string | - |
credits? | string | - |
monthly? | number | - |
yearly? | number | - |
cta? | string | - |
featured? | boolean | - |
features? | string[] | - |