suiss/uim · Block

Grid Carousel

A horizontal carousel of large product cards with a page indicator.

Grid Carousel is an open-source mobile screen from suiss/uim for React Native and Expo, with SwiftUI and Jetpack Compose versions built from the same design tokens. The @esuiss/uim CLI copies its source into your project, so you own the code.

iOS
Grid Carousel on iOS in light mode

Composes Screen, Carousel with CarouselPageIndicator, Text and product photos. Each card shows an optional kicker, name, tagline and starting price, and the whole card is pressable.

Installation

$ pnpm dlx @esuiss/uim@latest add grid-carousel

The CLI also adds what it builds on: Carousel, Page Indicator, Screen, Text.

Manual

  1. Install the dependencies:
npx expo install react-native-reanimated react-native-worklets
  1. Add the pieces it builds on: Carousel, Page Indicator, Screen, Text.

  2. Copy the source into components/blocks/grid-carousel.tsx:

uniwind/components/blocks/grid-carousel.tsx
import { Image, Pressable, ScrollView, View } from "react-native"
import { FadeInDown, ReduceMotion } from "react-native-reanimated"
import { AnimatedView } from "@/components/ui/animated-view"
import {
  Carousel,
  CarouselContent,
  CarouselItem,
  useCarousel,
} from "@/components/ui/carousel"
import { PageIndicator } from "@/components/ui/page-indicator"
import { Screen } from "@/components/ui/screen"
import { Text } from "@/components/ui/text"

const photo = (id: string) =>
  `https://images.unsplash.com/photo-${id}?w=800&q=80&auto=format&fit=crop`
  1. Update the import paths to match your project.

Usage

import { GridCarousel } from "@/components/blocks/grid-carousel"
<GridCarousel />

Replace PRODUCTS with your items. Pass onSelectProduct to receive the name of the pressed product.