Carousel Product Card
Compact product card design for horizontal scrolling lists, featuring a clean white aesthetic and brutalist accents.
Component Features and Props
How to Use Carousel Product Card Component
Installation Guide for Carousel Product Card
Component Props
Specifications
| Prop | Type | Default | Description |
|---|---|---|---|
productReq | Product | - | Product data object |
onAdd | (id: string) => void | - | Add to cart callback |
Install
TERMINAL
$ npx expo install lucide-react-nativeComponent Code
Component.tsx
1import React from 'react';
2import {
3 StyleSheet,
4 View,
5 Text,
6 Image,
7 TouchableOpacity,
8 Dimensions,
9 Platform,
10} from 'react-native';
11import { Heart, Plus } from 'lucide-react-native';
12
13const { width } = Dimensions.get('window');
14export const CARD_WIDTH = width * 0.28;
15
16export interface Product {
17 id: string;
18 name: string;
19 unit: string;
20 price: number;Usage
Usage.tsx
import React from 'react';
import {
SafeAreaView,
StyleSheet,
Text,
View,
FlatList,
TouchableOpacity,
StatusBar,
ScrollView
} from 'react-native';
import { ChevronRight } from 'lucide-react-native';
import ProductCard, { Product, CARD_WIDTH } from './components/ProductCard';
const DATA: Product[] = [
{
id: '1',
name: "L'Oreal Paris Hyaluron Conditioner",
unit: '175 ml',
price: 213,100%
Interactive Preview running on Expo Web.
Gestures and animations are simulated.
100%
