suiss/ui · Block
Price Care
A device protection plan picker with device chips, payment options, an optional theft add-on, and a live total.
Price Care is an open-source block from suiss/ui for React, React Native, SwiftUI and Jetpack Compose. The @esuiss/ui CLI copies its source into your project, so you own the code.
A protection plan picker: choose a device, pick a payment option for it and, for some devices, add theft and loss cover, with a live total and an Add to Bag button. A photo of the selected device sits beside the options on desktop and above them on mobile. Use it for warranties, insurance add-ons or any per-product plan.
Installation
CLI
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Manual
-
Add the pieces it builds on: Button, Label, Radio Group, Switch, Toggle Group.
-
Copy the source into
components/blocks/price-care.tsx:
- Update the import paths to match your project.
Usage
Edit devices; each has a name, photo, alt text and payment options with a label, price and optional theft surcharge. The theft switch only appears for Phone Pro, so change that check if other devices offer it. Give Add to Bag a handler.
Notes
The total is announced when it changes. Photos are Unsplash placeholders.

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
The CLI also adds what it builds on: Bottom Bar, Button, Radio Group, Screen, Switch, Text, Toggle Group. On React Native it also adds the animated view components/ui/animated-view.tsx.
Manual
- Install the dependencies:
-
Add the pieces it builds on: Bottom Bar, Button, Radio Group, Screen, Switch, Text, Toggle Group, and the animated view
components/ui/animated-view.tsxfrom the next step. -
Copy the animated view into
components/ui/animated-view.tsx:
- Copy the source into
components/blocks/price-care.tsx:
- Update the import paths to match your project.
- Install the dependencies:
-
Add the pieces it builds on: Bottom Bar, Button, Radio Group, Screen, Switch, Text, Toggle Group, and the animated view
components/ui/animated-view.tsxfrom the next step. -
Copy the animated view into
components/ui/animated-view.tsx:
- Copy the source into
components/blocks/price-care.tsx:
- Update the import paths to match your project.
- Install the dependencies:
-
Add the pieces it builds on: Bottom Bar, Button, Radio Group, Screen, Switch, Text, Toggle Group, and the animated view
components/ui/animated-view.tsxfrom the next step. -
Copy the animated view into
components/ui/animated-view.tsx:
- Copy the source into
components/blocks/price-care.tsx:
- Update the import paths to match your project.
-
Target iOS 17 or later.
-
Add the Swift package to your app:
- Copy the theme files every view uses:
- Copy the source and every file it uses:
- Add the files to your app target.
- Set
minSdkto 24 or higher and add the dependencies:
- Copy the theme files every view uses:
- Copy the source and every file it uses:
- Update the
com.esuiss.uipackage names to match your project.
Usage
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.
