calendar
nrjdalal/calendarFreeComponent
acme publishes no description for this item.
Install it
npx shadcn@latest add https://nrjdalal.dev/r/calendar.jsonSource
1"use client"23import { buttonVariants } from "@/components/ui/button"4import { cn } from "@/lib/utils"5import { ChevronLeft, ChevronRight } from "lucide-react"6import * as React from "react"7import { DayPicker } from "react-day-picker"89function Calendar({10 className,11 classNames,12 showOutsideDays = true,13 ...props14}: React.ComponentProps<typeof DayPicker>) {15 return (16 <DayPicker17 showOutsideDays={showOutsideDays}18 className={cn("p-3", className)}19 classNames={{20 months: "flex flex-col sm:flex-row gap-2",21 month: "flex flex-col gap-4",22 caption: "flex justify-center pt-1 relative items-center w-full",23 caption_label: "text-sm font-medium",24 nav: "flex items-center gap-1",25 nav_button: cn(26 buttonVariants({ variant: "outline" }),27 "size-7 bg-transparent p-0 opacity-50 hover:opacity-100",28 ),29 nav_button_previous: "absolute left-1",30 nav_button_next: "absolute right-1",31 table: "w-full border-collapse space-x-1",32 head_row: "flex",33 head_cell:34 "text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",35 row: "flex w-full mt-2",36 cell: cn(37 "relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md",38 props.mode === "range"39 ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md"40 : "[&:has([aria-selected])]:rounded-md",41 ),42 day: cn(43 buttonVariants({ variant: "ghost" }),44 "size-8 p-0 font-normal aria-selected:opacity-100",45 ),46 day_range_start:47 "day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",48 day_range_end:49 "day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",50 day_selected:51 "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",52 day_today: "bg-accent text-accent-foreground",53 day_outside:54 "day-outside text-muted-foreground aria-selected:text-muted-foreground",55 day_disabled: "text-muted-foreground opacity-50",56 day_range_middle:57// … truncated
What it pulls in
npm packages
Files it writes
More from acme
All 49 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | acme | Components | Free | 5 deps · 2 files | |
| alertalert | acme | Components | Free | 4 deps · 2 files | |
| alert-dialogalert-dialog | acme | Components | Free | 6 deps · 3 files | |
| aspect-ratioaspect-ratio | acme | Components | Free | 1 dep | |
| avataravatar | acme | Components | Free | 4 deps · 2 files | |
| badgebadge | acme | Components | Free | 5 deps · 2 files | |
| breadcrumbbreadcrumb | acme | Components | Free | 5 deps · 2 files | |
| buttonbutton | acme | Components | Free | 5 deps · 2 files |
