suiss/ui · Block
Grid Accessories
A filterable accessories grid with category chips and add-to-bag buttons that update a bag counter.
Grid Accessories 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 product grid with category filter chips and an add button on each card that turns into an In bag pill. A bag icon in the header shows the running count. Cards sit two per row on mobile and fill the width with auto-sized columns on desktop. Use it for accessory, add-on or catalog listings where shoppers add items straight from the grid.
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
- Install the dependencies:
-
Add the pieces it builds on: Button, Toggle Group.
-
Copy the source into
components/blocks/grid-accessories.tsx:
- Update the import paths to match your project.
Usage
Edit filters for the chips and accessories for the products; each product has a name, a category matching one of the filters, a formatted price and an image. Replace the local bag toggle with your cart logic.
Notes
The bag count is announced, and each add button names its product and exposes its pressed state. Product photos are Unsplash placeholders.

Composes Screen, Chip filters, Button, Icon and Text. Category chips filter the grid, and each card's plus button expands into an In bag state while a badge on the bag icon shows the item count.
Installation
The CLI also adds what it builds on: Button, Chip, Icon, Screen, Text. On React Native it also adds the animated view components/ui/animated-view.tsx.
Manual
- Install the dependencies:
-
Add the pieces it builds on: Button, Chip, Icon, Screen, Text, 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/grid-accessories.tsx:
- Update the import paths to match your project.
- Install the dependencies:
-
Add the pieces it builds on: Button, Chip, Icon, Screen, Text, 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/grid-accessories.tsx:
- Update the import paths to match your project.
- Install the dependencies:
-
Add the pieces it builds on: Button, Chip, Icon, Screen, Text, 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/grid-accessories.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 ACCESSORIES and FILTERS with your catalog. Pass onAddToBag, onRemoveFromBag and onFilterChange to sync with your cart.
