Skip to content

Commit c45368e

Browse files
authored
Merge pull request #91 from afsar-dev/dev
hover footer added
2 parents c8fea86 + adf20d2 commit c45368e

File tree

10 files changed

+527
-0
lines changed

10 files changed

+527
-0
lines changed

public/r/hover-footer.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
3+
"name": "hover-footer",
4+
"type": "registry:component",
5+
"dependencies": [
6+
"clsx",
7+
"tailwind-merge",
8+
"lucide-react",
9+
"motion"
10+
],
11+
"devDependencies": [],
12+
"registryDependencies": [],
13+
"files": [
14+
{
15+
"path": "./src/components/nurui/hover-footer.tsx",
16+
"content": "import React from \"react\";\nimport {\n Mail,\n Phone,\n MapPin,\n Facebook,\n Instagram,\n Twitter,\n Dribbble,\n Globe,\n} from \"lucide-react\";\nimport FooterBackgroundGradient from \"./footer-background-gradient\";\nimport { TextHoverEffect } from \"./text-hover-effect\";\n\nfunction HoverFooter() {\n return (\n <footer className=\"bg-[#0F0F11]/10 relative h-fit rounded-3xl overflow-hidden m-8\">\n <div className=\"max-w-7xl mx-auto p-14 z-40 relative\">\n {/* Main grid for the footer content */}\n\n <div className=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-12 md:gap-8 lg:gap-16 pb-12\">\n {/* Section 1: Pollen brand and description */}\n\n <div className=\"flex flex-col space-y-4\">\n <div className=\"flex items-center space-x-2\">\n <span className=\"text-[#3ca2fa] text-3xl font-extrabold\">\n &hearts;\n </span>\n\n <span className=\"text-white text-3xl font-bold\">Nur/ui</span>\n </div>\n\n <p className=\"text-sm leading-relaxed\">\n Nur UI is a modern React and Next.js based UI component library.\n </p>\n </div>\n\n {/* Section 2: About Us links */}\n\n <div>\n <h4 className=\"text-white text-lg font-semibold mb-6\">About Us</h4>\n\n <ul className=\"space-y-3\">\n <li>\n <a href=\"#\" className=\"hover:text-[#3ca2fa] transition-colors\">\n Company History\n </a>\n </li>\n\n <li>\n <a href=\"#\" className=\"hover:text-[#3ca2fa] transition-colors\">\n Meet the Team\n </a>\n </li>\n\n <li>\n <a href=\"#\" className=\"hover:text-[#3ca2fa] transition-colors\">\n Employee Handbook\n </a>\n </li>\n\n <li>\n <a href=\"#\" className=\"hover:text-[#3ca2fa] transition-colors\">\n Careers\n </a>\n </li>\n </ul>\n </div>\n\n {/* Section 3: Helpful Links */}\n\n <div>\n <h4 className=\"text-white text-lg font-semibold mb-6\">\n Helpful Links\n </h4>\n\n <ul className=\"space-y-3\">\n <li>\n <a href=\"#\" className=\"hover:text-[#3ca2fa] transition-colors\">\n FAQs\n </a>\n </li>\n\n <li>\n <a href=\"#\" className=\"hover:text-[#3ca2fa] transition-colors\">\n Support\n </a>\n </li>\n\n <li>\n <a\n href=\"#\"\n className=\"hover:text-[#3ca2fa] transition-colors relative\"\n >\n Live Chat\n <span className=\"absolute top-0 right-[-10px] w-2 h-2 rounded-full bg-[#3ca2fa] animate-pulse\"></span>\n </a>\n </li>\n </ul>\n </div>\n\n {/* Section 4: Contact Us */}\n\n <div>\n <h4 className=\"text-white text-lg font-semibold mb-6\">\n Contact Us\n </h4>\n\n <ul className=\"space-y-4\">\n <li className=\"flex items-center space-x-3\">\n <Mail size={18} className=\"text-[#3ca2fa]\" />\n\n <a\n href=\"mailto:[email protected]\"\n className=\"hover:text-[#3ca2fa] transition-colors\"\n >\n [email protected]\n </a>\n </li>\n\n <li className=\"flex items-center space-x-3\">\n <Phone size={18} className=\"text-[#3ca2fa]\" />\n\n <a\n href=\"tel:+918637373116\"\n className=\"hover:text-[#3ca2fa] transition-colors\"\n >\n +91 86373 73116\n </a>\n </li>\n\n <li className=\"flex items-center space-x-3\">\n <MapPin size={18} className=\"text-[#3ca2fa]\" />\n\n <span className=\"hover:text-[#3ca2fa] transition-colors\">\n Sylhet, Bangladesh\n </span>\n </li>\n </ul>\n </div>\n </div>\n\n {/* Separator line */}\n\n <hr className=\"border-t border-gray-700 my-8\" />\n\n {/* Bottom section: social media and copyright */}\n\n <div className=\"flex flex-col md:flex-row justify-between items-center text-sm space-y-4 md:space-y-0\">\n {/* Social Media Icons */}\n\n <div className=\"flex space-x-6 text-gray-400\">\n <a\n href=\"#\"\n aria-label=\"Facebook\"\n className=\"hover:text-[#3ca2fa] transition-colors relative\"\n >\n <Facebook size={20} />\n </a>\n\n <a\n href=\"#\"\n aria-label=\"Instagram\"\n className=\"hover:text-[#3ca2fa] transition-colors\"\n >\n <Instagram size={20} />\n </a>\n\n <a\n href=\"#\"\n aria-label=\"Twitter\"\n className=\"hover:text-[#3ca2fa] transition-colors\"\n >\n <Twitter size={20} />\n </a>\n\n <a\n href=\"#\"\n aria-label=\"Dribbble\"\n className=\"hover:text-[#3ca2fa] transition-colors\"\n >\n <Dribbble size={20} />\n </a>\n\n <a\n href=\"#\"\n aria-label=\"Globe\"\n className=\"hover:text-[#3ca2fa] transition-colors\"\n >\n <Globe size={20} />\n </a>\n </div>\n\n {/* Copyright text */}\n\n <div className=\"text-center md:text-left\">\n <p>&copy; 2025 Nurui. All rights reserved.</p>\n </div>\n </div>\n </div>\n\n <div className=\"lg:flex hidden h-[30rem] -mt-52 -mb-36\">\n <TextHoverEffect text=\"Nurui\" className=\"z-50\" />\n </div>\n\n <FooterBackgroundGradient />\n </footer>\n );\n}\n\nexport default HoverFooter;\n",
17+
"type": "registry:component"
18+
},
19+
{
20+
"path": "./src/components/nurui/text-hover-effect.tsx",
21+
"content": "\"use client\";\nimport React, { useRef, useEffect, useState } from \"react\";\nimport { motion } from \"motion/react\";\nimport { cn } from \"@/lib/utils\";\n\nexport const TextHoverEffect = ({\n text,\n duration,\n className,\n}: {\n text: string;\n duration?: number;\n automatic?: boolean;\n className?: string;\n}) => {\n const svgRef = useRef<SVGSVGElement>(null);\n const [cursor, setCursor] = useState({ x: 0, y: 0 });\n const [hovered, setHovered] = useState(false);\n const [maskPosition, setMaskPosition] = useState({ cx: \"50%\", cy: \"50%\" });\n\n useEffect(() => {\n if (svgRef.current && cursor.x !== null && cursor.y !== null) {\n const svgRect = svgRef.current.getBoundingClientRect();\n const cxPercentage = ((cursor.x - svgRect.left) / svgRect.width) * 100;\n const cyPercentage = ((cursor.y - svgRect.top) / svgRect.height) * 100;\n setMaskPosition({\n cx: `${cxPercentage}%`,\n cy: `${cyPercentage}%`,\n });\n }\n }, [cursor]);\n\n return (\n <svg\n ref={svgRef}\n width=\"100%\"\n height=\"100%\"\n viewBox=\"0 0 300 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n onMouseEnter={() => setHovered(true)}\n onMouseLeave={() => setHovered(false)}\n onMouseMove={(e) => setCursor({ x: e.clientX, y: e.clientY })}\n className={cn(\"select-none uppercase cursor-pointer\", className)}\n >\n <defs>\n <linearGradient\n id=\"textGradient\"\n gradientUnits=\"userSpaceOnUse\"\n cx=\"50%\"\n cy=\"50%\"\n r=\"25%\"\n >\n {hovered && (\n <>\n <stop offset=\"0%\" stopColor=\"#eab308\" />\n <stop offset=\"25%\" stopColor=\"#ef4444\" />\n <stop offset=\"50%\" stopColor=\"#80eeb4\" />\n <stop offset=\"75%\" stopColor=\"#06b6d4\" />\n <stop offset=\"100%\" stopColor=\"#8b5cf6\" />\n </>\n )}\n </linearGradient>\n\n <motion.radialGradient\n id=\"revealMask\"\n gradientUnits=\"userSpaceOnUse\"\n r=\"20%\"\n initial={{ cx: \"50%\", cy: \"50%\" }}\n animate={maskPosition}\n transition={{ duration: duration ?? 0, ease: \"easeOut\" }}\n >\n <stop offset=\"0%\" stopColor=\"white\" />\n <stop offset=\"100%\" stopColor=\"black\" />\n </motion.radialGradient>\n <mask id=\"textMask\">\n <rect\n x=\"0\"\n y=\"0\"\n width=\"100%\"\n height=\"100%\"\n fill=\"url(#revealMask)\"\n />\n </mask>\n </defs>\n <text\n x=\"50%\"\n y=\"50%\"\n textAnchor=\"middle\"\n dominantBaseline=\"middle\"\n strokeWidth=\"0.3\"\n className=\"fill-transparent stroke-neutral-200 font-[helvetica] text-7xl font-bold dark:stroke-neutral-800\"\n style={{ opacity: hovered ? 0.7 : 0 }}\n >\n {text}\n </text>\n <motion.text\n x=\"50%\"\n y=\"50%\"\n textAnchor=\"middle\"\n dominantBaseline=\"middle\"\n strokeWidth=\"0.3\"\n className=\"fill-transparent stroke-[#3ca2fa] font-[helvetica] text-7xl font-bold \n dark:stroke-[#3ca2fa99]\"\n initial={{ strokeDashoffset: 1000, strokeDasharray: 1000 }}\n animate={{\n strokeDashoffset: 0,\n strokeDasharray: 1000,\n }}\n transition={{\n duration: 4,\n ease: \"easeInOut\",\n }}\n >\n {text}\n </motion.text>\n <text\n x=\"50%\"\n y=\"50%\"\n textAnchor=\"middle\"\n dominantBaseline=\"middle\"\n stroke=\"url(#textGradient)\"\n strokeWidth=\"0.3\"\n mask=\"url(#textMask)\"\n className=\"fill-transparent font-[helvetica] text-7xl font-bold\"\n >\n {text}\n </text>\n </svg>\n );\n};\n",
22+
"type": "registry:component"
23+
},
24+
{
25+
"path": "./src/components/nurui/footer-background-gradient.tsx",
26+
"content": "import React from \"react\";\n\nconst FooterBackgroundGradient = () => {\n return (\n <div\n className=\"absolute inset-0 z-0\"\n style={{\n background:\n \"radial-gradient(125% 125% at 50% 10%, #0F0F1166 50%, #3ca2fa33 100%)\",\n }}\n />\n );\n};\n\nexport default FooterBackgroundGradient;\n",
27+
"type": "registry:component"
28+
}
29+
]
30+
}

registry-cli.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,23 @@
113113
}
114114
]
115115
},
116+
{
117+
"name": "hover-footer",
118+
"type": "registry:component",
119+
"devDependencies": [],
120+
"dependencies": ["lucide-react", "motion"],
121+
"registryDependencies": [],
122+
"files": [
123+
{
124+
"path": "./src/components/nurui/text-hover-effect.tsx",
125+
"type": "registry:component"
126+
},
127+
{
128+
"path": "./src/components/nurui/footer-background-gradient.tsx",
129+
"type": "registry:component"
130+
}
131+
]
132+
},
116133

117134
{
118135
"name": "project-showcase",

registry.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,28 @@
152152
]
153153
},
154154

155+
{
156+
"name": "hover-footer",
157+
"type": "registry:component",
158+
"devDependencies": [],
159+
"dependencies": ["clsx", "tailwind-merge", "lucide-react", "motion"],
160+
"registryDependencies": [],
161+
"files": [
162+
{
163+
"path": "./src/components/nurui/hover-footer.tsx",
164+
"type": "registry:component"
165+
},
166+
{
167+
"path": "./src/components/nurui/text-hover-effect.tsx",
168+
"type": "registry:component"
169+
},
170+
{
171+
"path": "./src/components/nurui/footer-background-gradient.tsx",
172+
"type": "registry:component"
173+
}
174+
]
175+
},
176+
155177
{
156178
"name": "project-showcase",
157179
"type": "registry:component",

src/app/preview/[component]/components-preview-registry.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ export const componentsPreviewRegistry: Record<
4242
"future-navbar": {
4343
component: dynamic(() => import("@/components/nurui/futrue-navbar")),
4444
},
45+
// footer
46+
"hover-footer": {
47+
component: dynamic(() => import("@/components/nurui/hover-footer")),
48+
},
4549
// components
4650
"project-showcase": {
4751
component: dynamic(
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from "react";
2+
3+
const FooterBackgroundGradient = () => {
4+
return (
5+
<div
6+
className="absolute inset-0 z-0"
7+
style={{
8+
background:
9+
"radial-gradient(125% 125% at 50% 10%, #0F0F1166 50%, #3ca2fa33 100%)",
10+
}}
11+
/>
12+
);
13+
};
14+
15+
export default FooterBackgroundGradient;
Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
import React from "react";
2+
import {
3+
Mail,
4+
Phone,
5+
MapPin,
6+
Facebook,
7+
Instagram,
8+
Twitter,
9+
Dribbble,
10+
Globe,
11+
} from "lucide-react";
12+
import FooterBackgroundGradient from "./footer-background-gradient";
13+
import { TextHoverEffect } from "./text-hover-effect";
14+
15+
function HoverFooter() {
16+
return (
17+
<footer className="bg-[#0F0F11]/10 relative h-fit rounded-3xl overflow-hidden m-8">
18+
<div className="max-w-7xl mx-auto p-14 z-40 relative">
19+
{/* Main grid for the footer content */}
20+
21+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-12 md:gap-8 lg:gap-16 pb-12">
22+
{/* Section 1: Pollen brand and description */}
23+
24+
<div className="flex flex-col space-y-4">
25+
<div className="flex items-center space-x-2">
26+
<span className="text-[#3ca2fa] text-3xl font-extrabold">
27+
&hearts;
28+
</span>
29+
30+
<span className="text-white text-3xl font-bold">Nur/ui</span>
31+
</div>
32+
33+
<p className="text-sm leading-relaxed">
34+
Nur UI is a modern React and Next.js based UI component library.
35+
</p>
36+
</div>
37+
38+
{/* Section 2: About Us links */}
39+
40+
<div>
41+
<h4 className="text-white text-lg font-semibold mb-6">About Us</h4>
42+
43+
<ul className="space-y-3">
44+
<li>
45+
<a href="#" className="hover:text-[#3ca2fa] transition-colors">
46+
Company History
47+
</a>
48+
</li>
49+
50+
<li>
51+
<a href="#" className="hover:text-[#3ca2fa] transition-colors">
52+
Meet the Team
53+
</a>
54+
</li>
55+
56+
<li>
57+
<a href="#" className="hover:text-[#3ca2fa] transition-colors">
58+
Employee Handbook
59+
</a>
60+
</li>
61+
62+
<li>
63+
<a href="#" className="hover:text-[#3ca2fa] transition-colors">
64+
Careers
65+
</a>
66+
</li>
67+
</ul>
68+
</div>
69+
70+
{/* Section 3: Helpful Links */}
71+
72+
<div>
73+
<h4 className="text-white text-lg font-semibold mb-6">
74+
Helpful Links
75+
</h4>
76+
77+
<ul className="space-y-3">
78+
<li>
79+
<a href="#" className="hover:text-[#3ca2fa] transition-colors">
80+
FAQs
81+
</a>
82+
</li>
83+
84+
<li>
85+
<a href="#" className="hover:text-[#3ca2fa] transition-colors">
86+
Support
87+
</a>
88+
</li>
89+
90+
<li>
91+
<a
92+
href="#"
93+
className="hover:text-[#3ca2fa] transition-colors relative"
94+
>
95+
Live Chat
96+
<span className="absolute top-0 right-[-10px] w-2 h-2 rounded-full bg-[#3ca2fa] animate-pulse"></span>
97+
</a>
98+
</li>
99+
</ul>
100+
</div>
101+
102+
{/* Section 4: Contact Us */}
103+
104+
<div>
105+
<h4 className="text-white text-lg font-semibold mb-6">
106+
Contact Us
107+
</h4>
108+
109+
<ul className="space-y-4">
110+
<li className="flex items-center space-x-3">
111+
<Mail size={18} className="text-[#3ca2fa]" />
112+
113+
<a
114+
href="mailto:[email protected]"
115+
className="hover:text-[#3ca2fa] transition-colors"
116+
>
117+
118+
</a>
119+
</li>
120+
121+
<li className="flex items-center space-x-3">
122+
<Phone size={18} className="text-[#3ca2fa]" />
123+
124+
<a
125+
href="tel:+918637373116"
126+
className="hover:text-[#3ca2fa] transition-colors"
127+
>
128+
+91 86373 73116
129+
</a>
130+
</li>
131+
132+
<li className="flex items-center space-x-3">
133+
<MapPin size={18} className="text-[#3ca2fa]" />
134+
135+
<span className="hover:text-[#3ca2fa] transition-colors">
136+
Sylhet, Bangladesh
137+
</span>
138+
</li>
139+
</ul>
140+
</div>
141+
</div>
142+
143+
{/* Separator line */}
144+
145+
<hr className="border-t border-gray-700 my-8" />
146+
147+
{/* Bottom section: social media and copyright */}
148+
149+
<div className="flex flex-col md:flex-row justify-between items-center text-sm space-y-4 md:space-y-0">
150+
{/* Social Media Icons */}
151+
152+
<div className="flex space-x-6 text-gray-400">
153+
<a
154+
href="#"
155+
aria-label="Facebook"
156+
className="hover:text-[#3ca2fa] transition-colors relative"
157+
>
158+
<Facebook size={20} />
159+
</a>
160+
161+
<a
162+
href="#"
163+
aria-label="Instagram"
164+
className="hover:text-[#3ca2fa] transition-colors"
165+
>
166+
<Instagram size={20} />
167+
</a>
168+
169+
<a
170+
href="#"
171+
aria-label="Twitter"
172+
className="hover:text-[#3ca2fa] transition-colors"
173+
>
174+
<Twitter size={20} />
175+
</a>
176+
177+
<a
178+
href="#"
179+
aria-label="Dribbble"
180+
className="hover:text-[#3ca2fa] transition-colors"
181+
>
182+
<Dribbble size={20} />
183+
</a>
184+
185+
<a
186+
href="#"
187+
aria-label="Globe"
188+
className="hover:text-[#3ca2fa] transition-colors"
189+
>
190+
<Globe size={20} />
191+
</a>
192+
</div>
193+
194+
{/* Copyright text */}
195+
196+
<div className="text-center md:text-left">
197+
<p>&copy; 2025 Nurui. All rights reserved.</p>
198+
</div>
199+
</div>
200+
</div>
201+
202+
<div className="lg:flex hidden h-[30rem] -mt-52 -mb-36">
203+
<TextHoverEffect text="Nurui" className="z-50" />
204+
</div>
205+
206+
<FooterBackgroundGradient />
207+
</footer>
208+
);
209+
}
210+
211+
export default HoverFooter;

0 commit comments

Comments
 (0)