suiss/uim · Block

Price Care

A device protection picker with device tabs, payment options, a theft add-on and a running total.

Price Care 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
Price Care on iOS in light mode

A product screen with a hero photo per device, a ToggleGroup to pick the device, and a RadioGroup of payment options. For the phone, a Switch adds theft and loss protection. A BottomBar shows the total, which updates with each choice, and an Add to Bag Button.

Installation

$ pnpm dlx @esuiss/uim@latest add price-care

The CLI also adds what it builds on: Bottom Bar, Button, Radio Group, Screen, Switch, Text, Toggle Group.

Manual

  1. Install the dependencies:
npx expo install cn react-native-reanimated react-native-worklets
  1. Add the pieces it builds on: Bottom Bar, Button, Radio Group, Screen, Switch, Text, Toggle Group.

  2. Copy the source into components/blocks/price-care.tsx:

uniwind/components/blocks/price-care.tsx
import { cn } from "cn"
import * as React from "react"
import { Image, Pressable, ScrollView, View } from "react-native"
import {
  FadeInDown,
  ReduceMotion,
  useAnimatedStyle,
  useSharedValue,
  withTiming,
} from "react-native-reanimated"
import { AnimatedView } from "@/components/ui/animated-view"
import { BottomBar, BottomBarContent } from "@/components/ui/bottom-bar"
import { Button } from "@/components/ui/button"
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"
import { Screen } from "@/components/ui/screen"
import { Switch } from "@/components/ui/switch"
  1. Update the import paths to match your project.

Usage

import { PriceCare } from "@/components/blocks/price-care"
<PriceCare />

Replace DEVICES with your products, options and prices. Wire onAddToBag, which receives the device, option, theft add-on and total. The photos are Unsplash placeholders.