@trackpilots/year-picker
v1.0.11
Published
A customizable year picker component for React, built with Tailwind CSS.
Downloads
5
Maintainers
Readme
@trackpilots/year-picker
A customizable year picker component built with React and Tailwind CSS.
✨ Screenshots
🚀 Installation
You can install the package using npm or yarn:
Using npm
npm install @trackpilots/year-picker
# or
yarn add @trackpilots/year-pickerMake sure Tailwind CSS is installed in your project.
📌 Usage
Use in Your Component
import React, { useState } from "react";
import YearPicker from "@trackpilots/year-picker";
const App = () => {
const [selectedYear, setSelectedYear] = useState(null);
const handleChange = (year) => {
setSelectedYear(year);
console.log("Selected Year:", year);
};
return (
<div className="p-4">
<h2 className="text-lg font-bold">Date Picker</h2>
<YearPicker
onChange={handleChange}
/>
<p>Selected Year: {selectedYear ? selectedYear.year : "None"}</p>
</div>
);
};
export default App;📌 DateFilter Component
A React Select component that allows users to choose a Year
⚙️ Props
| Prop Name | Type | Default | Description |
|---------------|------------------|----------------|----------------------------------|
| onChange | function | () => {} | Triggered when a Year is selected. |
✨ Example
<YearPicker
onChange={(Year) => console.log("Selected Year:", year)}
/>📦 Dependencies
- React
- Tailwind CSS
- react-icons (for
IoCalendarOutlineicon)
📌 Maintainers
These packages are maintained by Quick App Studio Developers.
📄 License
This project is licensed under the MIT License.

