calendar
agentmesh/calendarFreeComponent
shadcn/ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by shadcn/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://raw.githubusercontent.com/ombhanushaliii/agentmesh/main/example/ui/apps/v4/public/r/styles/base-vega/calendar.jsonSource
1"use client"23import * as React from "react"4import {5 DayPicker,6 getDefaultClassNames,7 type DayButton,8 type Locale,9} from "react-day-picker"1011import { cn } from "@/registry/base-vega/lib/utils"12import { Button, buttonVariants } from "@/registry/base-vega/ui/button"13import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"1415function Calendar({16 className,17 classNames,18 showOutsideDays = true,19 captionLayout = "label",20 buttonVariant = "ghost",21 locale,22 formatters,23 components,24 ...props25}: React.ComponentProps<typeof DayPicker> & {26 buttonVariant?: React.ComponentProps<typeof Button>["variant"]27}) {28 const defaultClassNames = getDefaultClassNames()2930 return (31 <DayPicker32 showOutsideDays={showOutsideDays}33 className={cn(34 "group/calendar bg-background p-3 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(8)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",35 String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,36 String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,37 className38 )}39 captionLayout={captionLayout}40 locale={locale}41 formatters={{42 formatMonthDropdown: (date) =>43 date.toLocaleString(locale?.code, { month: "short" }),44 ...formatters,45 }}46 classNames={{47 root: cn("w-fit", defaultClassNames.root),48 months: cn(49 "relative flex flex-col gap-4 md:flex-row",50 defaultClassNames.months51 ),52 month: cn("flex w-full flex-col gap-4", defaultClassNames.month),53 nav: cn(54 "absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",55 defaultClassNames.nav56 ),57 button_previous: cn(58 buttonVariants({ variant: buttonVariant }),59 "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",60 defaultClassNames.button_previous61 ),62 button_next: cn(63 buttonVariants({ variant: buttonVariant }),64 "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",65 defaultClassNames.button_next66 ),67 month_caption: cn(68 "flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",69 defaultClassNames.month_caption70 ),71 dropdowns: cn(72 "flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",73 defaultClassNames.dropdowns74// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from shadcn/ui
All 201 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | shadcn/ui | Components | Free | no deps | |
| alertalert | shadcn/ui | Components | Free | no deps | |
| alert-dialogalert-dialog | shadcn/ui | Components | Free | no deps | |
| aspect-ratioaspect-ratio | shadcn/ui | Components | Free | no deps | |
| avataravatar | shadcn/ui | Components | Free | no deps | |
| badgebadge | shadcn/ui | Components | Free | no deps | |
| breadcrumbbreadcrumb | shadcn/ui | Components | Free | no deps | |
| buttonbutton | shadcn/ui | Components | Free | no deps |
