Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Shopping List by Aisle Block for Radix UI

A weekly shop list in Produce, Dairy, Pantry and Household bands with a quantity stepper per item, line prices, an In basket and Still to get total in whole pence, and Clear purchased with Undo.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Make the weekly shop easy to walk, with this shopping list block for React with Radix UI. Items sit in aisle bands, each with a count of what is in the basket, and every row has a Checkbox named by the item, a quantity stepper from 1 to 9 and the price of the line. The foot works two totals from whole pence, so the figures always add up: what is In basket and what is Still to get. An outline Clear purchased button removes the ticked items and keeps a one-line Undo that puts them back where they were. A labelled Input with the only colored control, a Shine Button, adds an item under Produce; an empty submit says "Write an item first" and keeps focus. The list region holds its height, so clearing never lifts the foot, and an Empty state appears when nothing is left. Guides rule the bands. For grocery apps, household planners and any list with a running total.

FAQ

How do I load my own items?

Replace START with your items. Each has an aisle, a name, a qty, a cents price for one and a done flag. Add an aisle to AISLES and the band appears. Prices are whole pence, so convert from your store's decimals when you load them.

Why are prices kept in whole pence?

Adding decimals in a browser can print totals like 8.350000000000001. The block adds integers and formats them once with the pounds helper, so a line, a band and the foot always agree. Change the helper to format another currency, and mark the symbol with dir="ltr" as it does now so right-to-left pages keep the figure whole.

What stays local, and how do I save for real?

Everything. Ticking, changing a quantity, adding, clearing and undoing change state on the page; nothing is saved, ordered or sent, and the list resets on reload. In your app write each change from toggle, setQty, add, clearBasket and undo to your own store.

How does Undo work?

Clear purchased removes every ticked item and shows one line, for example "Cleared 3 items from the basket", with an Undo button. Undo returns them to the positions they had. The line holds one removal; adding an item replaces it, and nothing disappears on a timer.

Is it accessible?

Each checkbox is named by its item, the stepper buttons say "Fewer Oat milk" and "More Oat milk", and the quantity is real text. A single polite status message announces each change. At 1 and 9 the stepper buttons stay focusable and answer instead of doing nothing.

How does it look on a phone?

The add field and its button stay in one row. Each item takes two lines, the name and price first and the stepper beneath, and the list scrolls inside a named region rather than lengthening the page.