react-native-custom-time-picker
v1.0.6
Published
A simple custom time picker component for React Native. That is compatible with expo go
Maintainers
Readme
⏰ React Native Custom Time Picker
A lightweight and customizable time picker component for React Native, built with FlatList for smooth scrolling and snapping.
Perfect for apps that need a simple, intuitive way for users to select hours and minutes.
🚀 Installation
npm install react-native-custom-time-picker📦 Usage
import React, { useState } from "react";
import { View, Text } from "react-native";
import CustomTimePicker from "react-native-custom-time-picker";
export default function App() {
const [time, setTime] = useState("");
return (
<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
<Text style={{ fontSize: 18, marginBottom: 10 }}>
Selected Time: {time}
</Text>
<CustomTimePicker onTimeSelected={(t) => setTime(t)} />
</View>
);
}⚙️ Props
| Prop | Type | Default | Description |
| ---------------- | ------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------ |
| onTimeSelected | (time: string) => void | undefined | Callback fired when the user presses Confirm. Returns the selected time as a string in "HH:mm" format. |
