Skip to content

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

fix: add colors to hero sections

Dillion Verma673b18843eae
diff --git a/registry/blocks/example/hero-1.tsx b/registry/blocks/example/hero-1.tsx
index 1a3661b3..60c91164 100644
--- a/registry/blocks/example/hero-1.tsx
+++ b/registry/blocks/example/hero-1.tsx
@@ -98,13 +98,33 @@ export default function Hero() {
variants={fadeUpVariants}
initial={false}
transition={{
- duration: 0.6,
+ duration: 1.4,
delay: 0.4,
ease: [0.21, 0.47, 0.32, 0.98],
type: "spring",
}}
className="relative mt-24 h-full w-full rounded-xl after:absolute after:inset-0 after:z-50 after:[background:linear-gradient(to_top,#fff_30%,transparent)] dark:after:[background:linear-gradient(to_top,#000000_30%,transparent)]"
>
+ <div
+ className={cn(
+ "absolute inset-0 bottom-1/2 h-full w-full [filter:blur(120px)] ",
+
+ // light styles
+ "[background-image:linear-gradient(to_bottom,#ffaa40,transparent_30%)]",
+
+ // dark styles
+ "dark:[background-image:linear-gradient(to_bottom,#ffffff,transparent_30%)]",
+ )}
+ />
+
+ <img
+ src="/dashboard-light.png"
+ className="relative block h-full w-full rounded-xl border dark:hidden"
+ />
+ <img
+ src="/dashboard-dark.png"
+ className="relative hidden h-full w-full rounded-xl border dark:block"
+ />
{/* <video
autoPlay
loop
@@ -112,16 +132,9 @@ export default function Hero() {
src="demo.mp4"
className="h-auto w-full"
/> */}
- <img
- src="/dashboard-light.png"
- className="block h-full w-full rounded-xl border dark:hidden"
- />
- <img
- src="/dashboard-dark.png"
- className="hidden h-full w-full rounded-xl border dark:block"
- />
- <BorderBeam />
- <BorderBeam delay={20} />
+
+ <BorderBeam size={150} />
+ <BorderBeam size={150} delay={7} />
</motion.div>
</div>
</div>
diff --git a/registry/blocks/example/hero-2.tsx b/registry/blocks/example/hero-2.tsx
index 9efab3e1..22ffaaf8 100644
--- a/registry/blocks/example/hero-2.tsx
+++ b/registry/blocks/example/hero-2.tsx
@@ -107,6 +107,17 @@ export default function Hero() {
}}
className="relative mt-24 h-full w-full rounded-xl border shadow-2xl"
>
+ <div
+ className={cn(
+ "absolute inset-0 bottom-1/2 h-full w-full [filter:blur(120px)] ",
+
+ // light styles
+ "[background-image:linear-gradient(to_bottom,#ffaa40,transparent_30%)]",
+
+ // dark styles
+ "dark:[background-image:linear-gradient(to_bottom,#ffffff,transparent_30%)]",
+ )}
+ />
{/* <video
autoPlay
loop
@@ -116,11 +127,11 @@ export default function Hero() {
/> */}
<img
src="/dashboard-light.png"
- className="block h-full w-full rounded-xl dark:hidden"
+ className="relative block h-full w-full rounded-xl dark:hidden"
/>
<img
src="/dashboard-dark.png"
- className="hidden h-full w-full rounded-xl dark:block"
+ className="relative hidden h-full w-full rounded-xl dark:block"
/>
<BorderBeam />
</motion.div>