UNPKG

react-clockify

Version:

A sleek, customizable, and mobile-friendly React time picker clock UI component

80 lines (56 loc) โ€ข 1.92 kB
# โฐ react-clockify > A sleek, customizable, and mobile-friendly time picker component for React. Perfect for dashboards, forms, and scheduling interfaces. ## ๐Ÿ“ฆ Installation ```bash npm install react-clockify ``` or ```bash yarn add react-clockify ``` ## ๐Ÿš€ Usage ```jsx import React, { useState } from 'react'; import Clockify from 'react-clockify'; const App = () => { const [selectedTime, setSelectedTime] = useState('12:00'); return ( <div> <h3>Selected Time: {selectedTime}</h3> <Clockify value={selectedTime} onChange={(time) => setSelectedTime(time)} format="12" // or "24" /> </div> ); }; export default App; ``` ## โš™๏ธ Props | Prop | Type | Default | Description | |-------------|----------|---------|----------------------------------------------------| | `value` | `string` | `""` | Time in "HH:mm" format | | `onChange` | `func` | | Callback when time is changed | | `format` | `string` | `"12"` | Clock format: `"12"` for AM/PM or `"24"` for 24hr | ## ๐ŸŽจ Features - ๐Ÿ•’ Analog and digital hybrid time selection - ๐Ÿ“ฑ Responsive and mobile-friendly - ๐ŸŽฏ Simple API with full control over time selection - ๐ŸŒ“ AM/PM toggle or 24-hour support - โš›๏ธ Lightweight and dependency-free ## ๐Ÿ“ธ Demo ![Clock UI](./demo.png) ## ๐Ÿงช Running Locally ```bash git clone https://github.com/yourusername/react-clockify.git cd react-clockify npm install npm run storybook ``` ## ๐Ÿค Contributing Contributions, issues, and feature requests are welcome! Feel free to check [issues](https://github.com/yourusername/react-clockify/issues) or submit a PR. ## ๐Ÿ“œ License MIT ยฉ [Aryan Barde](https://github.com/aryanbarde80)