calendar
neobrutalism/calendarFreeComponent
neobrutalism publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by neobrutalism on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://neobrutalism.com/r/calendar.jsonSource
1"use client"23import * as React from "react"4import {5 ChevronDownIcon,6 ChevronLeftIcon,7 ChevronRightIcon,8} from "lucide-react"9import {10 DayPicker,11 getDefaultClassNames,12 type DayButton,13 type Locale,14} from "react-day-picker"1516import { cn } from "@/lib/utils"17import { Button, buttonVariants } from "@/components/ui/button"1819function Calendar({20 className,21 classNames,22 showOutsideDays = true,23 fixedWeeks = true,24 captionLayout = "label",25 buttonVariant = "ghost",26 locale,27 formatters,28 components,29 ...props30}: React.ComponentProps<typeof DayPicker> & {31 buttonVariant?: React.ComponentProps<typeof Button>["variant"]32}) {33 const defaultClassNames = getDefaultClassNames()3435 return (36 <DayPicker37 showOutsideDays={showOutsideDays}38 fixedWeeks={fixedWeeks}39 className={cn(40 "group/calendar bg-card p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(8)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",41 String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,42 String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,43 className44 )}45 captionLayout={captionLayout}46 locale={locale}47 formatters={{48 formatMonthDropdown: (date, dateLib) =>49 dateLib50 ? dateLib.format(date, "LLL")51 : date.toLocaleString(locale?.code, { month: "short" }),52 ...formatters,53 }}54 classNames={{55 root: cn("w-fit", defaultClassNames.root),56 months: cn(57 "relative flex flex-col gap-4 md:flex-row",58 defaultClassNames.months59 ),60 month: cn("flex w-full flex-col gap-4", defaultClassNames.month),61 nav: cn(62 "absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",63 defaultClassNames.nav64 ),65 button_previous: cn(66 buttonVariants({ variant: buttonVariant }),67 "size-(--cell-size) rounded border-2 p-0 shadow-sm select-none aria-disabled:opacity-50",68 defaultClassNames.button_previous69 ),70 button_next: cn(71 buttonVariants({ variant: buttonVariant }),72 "size-(--cell-size) rounded border-2 p-0 shadow-sm select-none aria-disabled:opacity-50",73 defaultClassNames.button_next74 ),75 month_caption: cn(76 "flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",77 defaultClassNames.month_caption78 ),79// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from neobrutalism
All 54 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | neobrutalism | Components | Free | 2 deps | |
| alertalert | neobrutalism | Components | Free | 2 deps | |
| alert-dialogalert-dialog | neobrutalism | Components | Free | 1 dep | |
| aspect-ratioaspect-ratio | neobrutalism | Components | Free | 1 dep | |
| avataravatar | neobrutalism | Components | Free | 1 dep | |
| badgebadge | neobrutalism | Components | Free | 2 deps | |
| breadcrumbbreadcrumb | neobrutalism | Components | Free | 2 deps | |
| buttonbutton | neobrutalism | Components | Free | 2 deps |
