Day Picker
uselayouts/day-pickerFreeComponent
A custom day picker component with smooth animations.
Live preview
live · rendered by the registry
Rendered by uselayouts on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://uselayouts.com/r/day-picker.jsonSource
1"use client";2import {3 Tick02Icon,4 CodeIcon,5 UnfoldMoreIcon,6} from "@hugeicons/core-free-icons";7import { HugeiconsIcon } from "@hugeicons/react";8import { useState } from "react";9import { cn } from "@/lib/utils";10import { AnimatePresence, motion } from "motion/react";1112const days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];13type options = "Daily" | "Weekly" | "Monthly" | "Yearly";14// Change Here15const options: options[] = ["Daily", "Weekly", "Monthly", "Yearly"];1617const springTransition = {18 type: "spring",19 damping: 30,20 stiffness: 400,21 mass: 1,22} as const;2324export default function TwentyThreeFour() {25 const [day, setDay] = useState(1);26 const [option, setOption] = useState<options>("Daily");27 const [isOptionOpen, setisOptionOpen] = useState(false);28 const [isSelectorOpen, setIsSelectorOpen] = useState(true);2930 return (31 <div className="w-full h-full flex justify-center items-center font-medium text-sm">32 <motion.div33 layout34 transition={springTransition}35 className="flex flex-col gap-1.5 shadow-lg overflow-hidden rounded-3xl bg-muted p-1.5 max-w-xs w-full"36 >37 <div className="flex justify-between items-center relative">38 <motion.div39 layout40 animate={{41 filter: isOptionOpen ? "blur(8px)" : "blur(0px)",42 }}43 transition={springTransition}44 className="px-3 text-muted-foreground h-full flex items-center justify-center py-2 "45 >46 Frequency47 </motion.div>48 {isOptionOpen ? (49 <div className="absolute w-full h-full flex justify-between gap-2 p-0">50 <motion.div className="flex justify-between w-full relative items-center rounded-3xl ">51 <motion.div52 layout53 transition={springTransition}54 layoutId="options"55 className="absolute w-full rounded-3xl bg-background h-full"56 ></motion.div>5758 <div className="flex justify-between px-1">59 {options.map((op) => {60 return (61 <motion.div62 key={op}63 layout64 initial={{65 filter: "blur(8px)",66 opacity: 0,67 }}68 animate={{69 filter: "blur(0px)",70// … truncated
What it pulls in
npm packages
Files it writes
More from uselayouts
All 26 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| 3D Book3d-book | uselayouts | Components | Free | 3 deps | |
| Animated Collectionanimated-collection | uselayouts | Components | Free | 5 deps | |
| Bento Cardbento-card | uselayouts | Components | Free | 5 deps | |
| Bottom Menubottom-menu | uselayouts | Components | Free | 6 deps | |
| Bucketbucket | uselayouts | Components | Free | 5 deps · 2 files | |
| Delete Buttondelete-button | uselayouts | Components | Free | 5 deps | |
| Discover Buttondiscover-button | uselayouts | Components | Free | 5 deps | |
| Discrete Tabsdiscrete-tabs | uselayouts | Components | Free | 3 deps |
