analog-clock-ios-style
Version:
An analog iOS style clock react component with tailwind css
97 lines (67 loc) • 2.37 kB
Markdown
[](https://dl.circleci.com/status-badge/redirect/gh/hmontazeri/Analag-Clock-iOS-Style/tree/main)
A beautiful, customizable analog clock React component that mimics the iOS clock design. This component provides a sleek and modern look while maintaining high performance and flexibility.

- 🎨 iOS-style design with smooth animations
- ⚡️ Built with React and TypeScript
- 🎯 Fully customizable colors and sizes
- 📱 Responsive and mobile-friendly
- 🧪 Tested with Jest
- 🎭 Styled with Tailwind CSS
- 📦 Zero dependencies (except React)
## Installation
```bash
npm install analog-clock-ios-style
# or
yarn add analog-clock-ios-style
```
## Usage
```jsx
import { AnalogClock } from 'analog-clock-ios-style';
import 'analog-clock-ios-style/dist/index.css';
function App() {
return (
<div className="clock-container">
<AnalogClock
size={200}
primaryColor="#000000"
secondaryColor="#666666"
backgroundColor="#ffffff"
/>
</div>
);
}
```
| Prop | Type | Default | Description |
| --------------- | ------ | --------- | ---------------------------------- |
| size | number | 200 | Size of the clock in pixels |
| primaryColor | string | '#000000' | Color of the hour and minute hands |
| secondaryColor | string | '#666666' | Color of the second hand |
| backgroundColor | string | '#ffffff' | Background color of the clock |
1. Clone the repository:
```bash
git clone https://github.com/yourusername/analog-clock-ios-style.git
cd analog-clock-ios-style
```
2. Install dependencies:
```bash
npm install
```
3. Start development:
```bash
npm run build
```
- `npm run build` - Build the component
- `npm run test` - Run tests
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Hamed Montazeri
---
Made with ❤️ and React