Team 1
smoothui-registry/team-1FreeBlock
Grid team section block with hover effects
Install it
npx shadcn@latest add https://www.smoothui.dev/r/team-1.jsonSource
1"use client";23import { getAllPeople, getAvatarUrl, type Person } from "@/lib/smoothui-data";4import { motion, useInView, useReducedMotion } from "motion/react";5import { useRef } from "react";67const DEFAULT_MEMBER_COUNT = 4;8const AVATAR_SIZE = 400;9const STAGGER_DELAY = 0.1;1011interface TeamGridProps {12 description?: string;13 members?: Person[];14 title?: string;15}1617export function TeamGrid({18 title = "Our team",19 description = "We're a dynamic group of individuals who are passionate about what we do and dedicated to delivering the best results for our clients.",20 members = getAllPeople().slice(0, DEFAULT_MEMBER_COUNT),21}: TeamGridProps) {22 const shouldReduceMotion = useReducedMotion();23 const ref = useRef(null);24 const isInView = useInView(ref, { once: true });2526 return (27 <section className="bg-primary py-24 sm:py-32">28 <div className="mx-auto max-w-7xl px-6 lg:px-8">29 <motion.div30 className="mx-auto max-w-2xl lg:mx-0"31 initial={shouldReduceMotion ? { opacity: 1 } : { opacity: 0, y: 20 }}32 transition={shouldReduceMotion ? { duration: 0 } : { duration: 0.6 }}33 viewport={{ once: true }}34 whileInView={35 shouldReduceMotion ? { opacity: 1 } : { opacity: 1, y: 0 }36 }37 >38 <h2 className="text-pretty font-semibold text-4xl text-foreground tracking-tight sm:text-5xl">39 {title}40 </h2>41 <p className="mt-6 text-foreground/70 text-lg/8">{description}</p>42 </motion.div>43 <motion.ul44 className="mx-auto mt-20 grid max-w-2xl grid-cols-1 gap-x-8 gap-y-14 sm:grid-cols-2 lg:mx-0 lg:max-w-none lg:grid-cols-3 xl:grid-cols-4"45 ref={ref}46 >47 {members.map((member, index) => (48 <motion.li49 animate={(() => {50 if (shouldReduceMotion) {51 return { opacity: 1 };52 }53 return isInView ? { opacity: 1, y: 0 } : { opacity: 0, y: 30 };54 })()}55 initial={56 shouldReduceMotion ? { opacity: 1 } : { opacity: 0, y: 30 }57 }58 key={member.name}59 transition={60 shouldReduceMotion61 ? { duration: 0 }62 : { delay: index * STAGGER_DELAY, duration: 0.6 }63 }64 >65 <motion.div66 className="group"67 transition={68 shouldReduceMotion69// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from SmoothUI Registry
All 178 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Chat Templatechat-template | SmoothUI Registry | Blocks | Free | 2 deps · 4 files | |
| Cta 1cta-1 | SmoothUI Registry | Blocks | Free | 1 dep | |
| Cta 2cta-2 | SmoothUI Registry | Blocks | Free | 1 dep | |
| Cta 3cta-3 | SmoothUI Registry | Blocks | Free | 1 dep | |
| Faq 1faq-1 | SmoothUI Registry | Blocks | Free | 2 deps | |
| Faq 2faq-2 | SmoothUI Registry | Blocks | Free | 1 dep | |
| Faq 3faq-3 | SmoothUI Registry | Blocks | Free | 2 deps | |
| Faq 4faq-4 | SmoothUI Registry | Blocks | Free | 2 deps |
