@lh-tools/birthday-picker
v1.0.2
Published
A step-by-step birthday picker for React Native with zodiac/decade drill-down UI
Downloads
249
Maintainers
Readme
@lh-tools/birthday-picker
A step-by-step birthday picker for React Native with zodiac/decade drill-down UI.
Instead of a boring date picker, users select their birth date through an engaging flow:
- Zodiac animal (for Japanese/Vietnamese) or Decade (for English)
- Birth year (narrowed by zodiac)
- Star sign (Western zodiac)
- Month (narrowed by star sign)
- Day
Screenshots
Install
npm install @lh-tools/birthday-pickerUsage
import { BirthdayPicker } from '@lh-tools/birthday-picker';
function MyScreen() {
return (
<BirthdayPicker
locale="ja"
onComplete={(date) => console.log('Birthday:', date)}
theme={{ primary: '#6C5CE7' }}
/>
);
}Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| locale | 'en' \| 'ja' \| 'vi' | 'en' | Language for labels. ja/vi show zodiac animals, en shows decades. |
| initialDate | Date | 30 years ago | Pre-selected date |
| onDateChange | (date: Date) => void | - | Called on every selection step |
| onComplete | (date: Date) => void | - | Called when full date is selected |
| theme | Partial<Theme> | - | Color overrides |
Theme
interface Theme {
primary: string; // Main accent color
secondary: string; // Star sign accent color
text: string; // Text color
icon: string; // Secondary text / labels
border: string; // Border color
background: string; // Background color
}License
MIT
