About
Decade-grid year picker with keyboard nav, min/max bounds, single or range mode.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Year Picker to your project and fits it to your theme.
Code
How Year Picker is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import * as React from "react";
import YearPicker, {
YearPickerTrigger,
YearPickerContent,
} from "@/components/ui/year-picker";
export default function YearPickerDemo() {
const [year, setYear] = React.useState<number | undefined>(2024);
return (
<div className="flex min-h-[400px] w-full items-center justify-center">
<YearPicker
value={year}
onValueChange={setYear}
minYear={1970}
maxYear={2035}
>
<YearPickerTrigger className="w-48" />
<YearPickerContent />
</YearPicker>
</div>
);
}
















