Origin UI

Calendar [React-Area]

Component 112

About

Calendar [React-Area]

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Calendar [React-Area] to your project and fits it to your theme.

Code

How Calendar [React-Area] is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { Calendar } from "@/components/ui/calendar-rac";
import { getLocalTimeZone, today } from "@internationalized/date";
import { useState } from "react";
import type { DateValue } from "react-aria-components";

function Component() {
  const [date, setDate] = useState<DateValue | null>(today(getLocalTimeZone()));

  return (
    <div>
      <Calendar className="rounded-lg border border-border p-2" value={date} onChange={setDate} />
      <p
        className="mt-4 text-center text-xs text-muted-foreground"
        role="region"
        aria-live="polite"
      >
        Calendar -{" "}
        <a
          className="underline hover:text-foreground"
          href="https://react-spectrum.adobe.com/react-aria/DateRangePicker.html"
          target="_blank"
          rel="noopener nofollow"
        >
          React Aria
        </a>
      </p>
    </div>
  );
}

export { Component };

Dependencies

More by Origin UI

View all
  • Dialog

    Dialog

    1.2K
  • Avatar

    Avatar

    950
  • useImageUpload

    useImageUpload

    926
  • usePagination

    usePagination

    622
  • Popover

    Popover

    384
  • Button

    Button

    361
  • Command

    Command

    320
  • Accordion

    Accordion

    256