Booking Card
Travel booking card with image slider, gradient overlays, and glassmorphism rating badge.
Component Features and Props
How to Use Booking Card Component
Installation Guide for Booking Card
Props
| Property | Type | Default | Description |
|---|---|---|---|
| location | string | Torreano, Italy | Location name |
| type | string | Tiny home - Nature | Accommodation type |
| dateRange | string | May 4-10 | Available dates |
| price | string | 200 | Price per night |
| rating | string | 4.8 | Star rating |
| imageREQUIRED | ImageSourcePropType | - | Main illustration image |
| onBookPress | () => void | - | Booking action callback |
Install
TERMINAL
$ npx expo install expo-linear-gradient expo-vector-iconsComponent Code
Component.tsx
1import React from 'react';
2import {
3 StyleSheet,
4 View,
5 Text,
6 Image,
7 TouchableOpacity,
8 Dimensions,
9 ImageSourcePropType,
10} from 'react-native';
11import { Ionicons } from '@expo/vector-icons';
12import { LinearGradient } from 'expo-linear-gradient';
13
14const { width } = Dimensions.get('window');
15
16interface BookingCardProps {
17 location?: string;
18 type?: string;
19 dateRange?: string;
20 price?: string;Usage
Usage.tsx
import React from 'react';
import { StyleSheet, View, SafeAreaView } from 'react-native';
import BookingCard from './components/BookingCard';
export default function App() {
return (
<SafeAreaView style={styles.container}>
<BookingCard
image={{ uri: 'https://images.unsplash.com/photo-1510798831971-661eb04b3739?q=80&w=1000&auto=format&fit=crop' }}
location="Torreano, Italy"
price="200"
onBookPress={() => alert('Booking logic goes here!')}
/>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,100%
Interactive Preview running on Expo Web.
Gestures and animations are simulated.
100%
