Animated Select
tripled/animated-select-shadcnuiFreeComponent
Select dropdown with smooth open/close animation
Live preview
live · rendered by the registry
Rendered by tripled on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.tripled.work/r/animated-select-shadcnui.jsonSource
1"use client";23import { AnimatePresence, motion } from "framer-motion";4import { Check, ChevronDown } from "lucide-react";5import { useState } from "react";67const options = ["React", "Vue", "Angular", "Svelte", "Next.js"];89export function AnimatedSelect() {10 const [isOpen, setIsOpen] = useState(false);11 const [selected, setSelected] = useState(options[0]);1213 return (14 <div className="relative w-full max-w-xs">15 <motion.button16 onClick={() => setIsOpen(!isOpen)}17 className="flex w-full items-center justify-between rounded-lg border bg-[var(--card-bg)] px-4 py-2 text-sm"18 whileHover={{ scale: 1.01 }}19 whileTap={{ scale: 0.99 }}20 >21 <span>{selected}</span>22 <motion.div animate={{ rotate: isOpen ? 180 : 0 }}>23 <ChevronDown className="h-4 w-4" />24 </motion.div>25 </motion.button>2627 <AnimatePresence>28 {isOpen && (29 <motion.div30 initial={{ opacity: 0, y: -10 }}31 animate={{ opacity: 1, y: 0 }}32 exit={{ opacity: 0, y: -10 }}33 transition={{ duration: 0.2 }}34 className="absolute top-full z-50 mt-2 w-full rounded-lg border bg-[var(--card-bg)] py-2 shadow-lg"35 >36 {options.map((option, index) => (37 <motion.button38 key={option}39 initial={{ opacity: 0, x: -10 }}40 animate={{ opacity: 1, x: 0 }}41 transition={{ delay: index * 0.05 }}42 onClick={() => {43 setSelected(option);44 setIsOpen(false);45 }}46 className="flex w-full items-center justify-between px-4 py-2 text-left text-sm hover:bg-accent/10"47 whileHover={{ x: 4 }}48 >49 <span>{option}</span>50 {selected === option && (51 <Check className="h-4 w-4 text-accent" />52 )}53 </motion.button>54 ))}55 </motion.div>56 )}57 </AnimatePresence>58 </div>59 );60}
What it pulls in
npm packages
Other registry items
Files it writes
More from tripled
All 282 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| AI Chat Interfaceai-chat-interface-shadcnui | tripled | Components | Free | 2 deps | |
| AI Glow Inputai-glow-input-shadcnui | tripled | Components | Free | 2 deps | |
| AI Loading Skeletonai-loading-skeleton-shadcnui | tripled | Components | Free | 2 deps | |
| AI Response Typing Streamai-response-typing-shadcnui | tripled | Components | Free | 2 deps | |
| AI Unlock Animationai-unlock-animation-shadcnui | tripled | Components | Free | 2 deps | |
| Animated Accordionanimated-accordion-shadcnui | tripled | Components | Free | 2 deps | |
| Animated Card Stackanimated-card-stack-baseui | tripled | Components | Free | 2 deps | |
| Animated Card Stackanimated-card-stack-shadcnui | tripled | Components | Free | 2 deps |
