A collection of customizable UI components for React, starting with a DatePicker. More components coming soon!
npm install dj-react-lib
or
yarn add dj-react-lib
import React, { useState } from "react";
import { DatePicker } from "dj-react-lib";
const App = () => {
const [selectedDate, setSelectedDate] = useState("2025-02-24");
return (
<DatePicker
value={selectedDate}
mode="date"
onChange={(date) => setSelectedDate(date)}
/>
);
};
export default App;
A flexible and lightweight date selection component.
Prop | Type | Default | Description |
---|---|---|---|
value |
string |
new Date().toISOString() |
The currently selected date as an ISO string. Defaults to the current date if not provided. |
mode |
'date' | 'month' | 'year' |
'date' |
Determines whether the picker selects a date, month, or year. |
onChange |
(date: string) => void |
null |
Callback triggered when the selected date changes. |
- Reusable UI Components – A growing library of customizable React components.
- DatePicker Included – Supports date, month, and year selection.
- Lightweight & Performant – Built for efficiency and flexibility.
- Customizable Styles – Easily style components to fit your design.
- ✅ DatePicker
- ⏳ More UI components coming soon...
MIT