calendar
skeuomorph-krzysztof/calendarFreeComponent
skeuomorph-krzysztof publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by skeuomorph-krzysztof on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://skeuomorph.krzysztof.studio/r/styles/new-york/calendar.jsonSource
1"use client"23import * as React from "react"4import {5 ChevronDownIcon,6 ChevronLeftIcon,7 ChevronRightIcon,8} from "lucide-react"9import { DayButton, DayPicker, getDefaultClassNames } from "react-day-picker"1011import { cn } from "@/lib/utils"12import { Button, buttonVariants } from "@/registry/new-york/ui/button"1314function Calendar({15 className,16 classNames,17 showOutsideDays = true,18 captionLayout = "label",19 buttonVariant = "ghost",20 formatters,21 components,22 ...props23}: React.ComponentProps<typeof DayPicker> & {24 buttonVariant?: React.ComponentProps<typeof Button>["variant"]25}) {26 const defaultClassNames = getDefaultClassNames()2728 return (29 <DayPicker30 showOutsideDays={showOutsideDays}31 className={cn(32 "bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",33 String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,34 String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,35 className36 )}37 captionLayout={captionLayout}38 formatters={{39 formatMonthDropdown: (date) =>40 date.toLocaleString("default", { month: "short" }),41 ...formatters,42 }}43 classNames={{44 root: cn("w-fit", defaultClassNames.root),45 months: cn(46 "relative flex flex-col gap-4 md:flex-row",47 defaultClassNames.months48 ),49 month: cn("flex w-full flex-col gap-4", defaultClassNames.month),50 nav: cn(51 "absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",52 defaultClassNames.nav53 ),54 button_previous: cn(55 buttonVariants({ variant: buttonVariant }),56 "h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",57 defaultClassNames.button_previous58 ),59 button_next: cn(60 buttonVariants({ variant: buttonVariant }),61 "h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",62 defaultClassNames.button_next63 ),64 month_caption: cn(65 "flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",66 defaultClassNames.month_caption67 ),68 dropdowns: cn(69 "flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",70 defaultClassNames.dropdowns71 ),72 dropdown_root: cn(73// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from skeuomorph-krzysztof
All 54 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | skeuomorph-krzysztof | Components | Free | 1 dep | |
| alertalert | skeuomorph-krzysztof | Components | Free | no deps | |
| alert-dialogalert-dialog | skeuomorph-krzysztof | Components | Free | 1 dep | |
| aspect-ratioaspect-ratio | skeuomorph-krzysztof | Components | Free | 1 dep | |
| avataravatar | skeuomorph-krzysztof | Components | Free | 1 dep | |
| badgebadge | skeuomorph-krzysztof | Components | Free | 1 dep | |
| breadcrumbbreadcrumb | skeuomorph-krzysztof | Components | Free | 1 dep | |
| buttonbutton | skeuomorph-krzysztof | Components | Free | 1 dep |
