Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

fix: update pricing section

Dillion Vermaeef2ecb95c90
diff --git a/registry/blocks/example/pricing-1.tsx b/registry/blocks/example/pricing-1.tsx
index 2a384562..22659e5d 100644
--- a/registry/blocks/example/pricing-1.tsx
+++ b/registry/blocks/example/pricing-1.tsx
@@ -127,89 +127,87 @@ export default function Pricing() {
<div
key={price.id}
className={cn(
- " relative flex h-full max-w-[400px] flex-col gap-8 overflow-hidden rounded-2xl border p-4 text-black dark:text-white",
+ " relative flex w-full max-w-[400px] flex-col gap-4 overflow-hidden rounded-2xl border p-4 text-black dark:text-white",
{
"border-2 border-neutral-700 shadow-lg shadow-neutral-500 dark:border-neutral-400 dark:shadow-neutral-600":
price.isMostPopular,
},
)}
>
- <div className="z-10 flex h-full w-full flex-col gap-4">
- <div className="flex items-center">
- <div className="ml-4">
- <h2 className="text-base font-semibold leading-7">
- {price.name}
- </h2>
- <p className="h-16 text-sm leading-5 text-black/70 dark:text-white">
- {price.description}
- </p>
- </div>
+ <div className="flex items-center">
+ <div className="ml-4">
+ <h2 className="text-base font-semibold leading-7">
+ {price.name}
+ </h2>
+ <p className="h-16 text-sm leading-5 text-black/70 dark:text-white">
+ {price.description}
+ </p>
</div>
+ </div>
- <motion.div
- key={`${price.id}-${interval}`}
- initial="initial"
- animate="animate"
- variants={{
- initial: {
- opacity: 0,
- y: 12,
- },
- animate: {
- opacity: 1,
- y: 0,
- },
- }}
- transition={{
- duration: 0.4,
- delay: 0.1 + idx * 0.05,
- ease: [0.21, 0.47, 0.32, 0.98],
- }}
- className="flex flex-row gap-1"
- >
- <span className="text-4xl font-bold text-black dark:text-white">
- $
- {interval === "year"
- ? toHumanPrice(price.yearlyPrice, 0)
- : toHumanPrice(price.monthlyPrice, 0)}
- <span className="text-xs"> / {interval}</span>
- </span>
- </motion.div>
-
- <Button
- className={cn(
- "group relative w-full gap-2 overflow-hidden text-lg font-semibold tracking-tighter",
- "transform-gpu ring-offset-current transition-all duration-300 ease-out hover:ring-2 hover:ring-primary hover:ring-offset-2",
- )}
- disabled={isLoading}
- onClick={() => void onSubscribeClick(price.id)}
- >
- <span className="absolute right-0 -mt-12 h-32 w-8 translate-x-12 rotate-12 transform-gpu bg-white opacity-10 transition-all duration-1000 ease-out group-hover:-translate-x-96 dark:bg-black" />
- {(!isLoading || (isLoading && id !== price.id)) && (
- <p>Subscribe</p>
- )}
+ <motion.div
+ key={`${price.id}-${interval}`}
+ initial="initial"
+ animate="animate"
+ variants={{
+ initial: {
+ opacity: 0,
+ y: 12,
+ },
+ animate: {
+ opacity: 1,
+ y: 0,
+ },
+ }}
+ transition={{
+ duration: 0.4,
+ delay: 0.1 + idx * 0.05,
+ ease: [0.21, 0.47, 0.32, 0.98],
+ }}
+ className="flex flex-row gap-1"
+ >
+ <span className="text-4xl font-bold text-black dark:text-white">
+ $
+ {interval === "year"
+ ? toHumanPrice(price.yearlyPrice, 0)
+ : toHumanPrice(price.monthlyPrice, 0)}
+ <span className="text-xs"> / {interval}</span>
+ </span>
+ </motion.div>
- {isLoading && id === price.id && <p>Subscribing</p>}
- {isLoading && id === price.id && (
- <Loader className="mr-2 h-4 w-4 animate-spin" />
- )}
- </Button>
+ <Button
+ className={cn(
+ "group relative w-full gap-2 overflow-hidden text-lg font-semibold tracking-tighter",
+ "transform-gpu ring-offset-current transition-all duration-300 ease-out hover:ring-2 hover:ring-primary hover:ring-offset-2",
+ )}
+ disabled={isLoading}
+ onClick={() => void onSubscribeClick(price.id)}
+ >
+ <span className="absolute right-0 -mt-12 h-32 w-8 translate-x-12 rotate-12 transform-gpu bg-white opacity-10 transition-all duration-1000 ease-out group-hover:-translate-x-96 dark:bg-black" />
+ {(!isLoading || (isLoading && id !== price.id)) && (
+ <p>Subscribe</p>
+ )}
- <hr className="m-0 h-px w-full border-none bg-gradient-to-r from-neutral-200/0 via-neutral-500/30 to-neutral-200/0" />
- {price.features && price.features.length > 0 && (
- <ul className="flex flex-col gap-2 font-normal">
- {price.features.map((feature: any, idx: any) => (
- <li
- key={idx}
- className="flex items-center gap-3 text-xs font-medium text-black dark:text-white"
- >
- <CheckIcon className="h-5 w-5 shrink-0 rounded-full bg-green-400 p-[2px] text-black dark:text-white" />
- <span className="flex">{feature}</span>
- </li>
- ))}
- </ul>
+ {isLoading && id === price.id && <p>Subscribing</p>}
+ {isLoading && id === price.id && (
+ <Loader className="mr-2 h-4 w-4 animate-spin" />
)}
- </div>
+ </Button>
+
+ <hr className="m-0 h-px w-full border-none bg-gradient-to-r from-neutral-200/0 via-neutral-500/30 to-neutral-200/0" />
+ {price.features && price.features.length > 0 && (
+ <ul className="flex flex-col gap-2 font-normal">
+ {price.features.map((feature: any, idx: any) => (
+ <li
+ key={idx}
+ className="flex items-center gap-3 text-xs font-medium text-black dark:text-white"
+ >
+ <CheckIcon className="h-5 w-5 shrink-0 rounded-full bg-green-400 p-[2px] text-black dark:text-white" />
+ <span className="flex">{feature}</span>
+ </li>
+ ))}
+ </ul>
+ )}
</div>
))}
</div>