BasilConceptInteractive preview
Basil: Your basket
An iOS grocery basket with drawn produce, quantity steppers with undo, a free-delivery progress bar, substitutions, a delivery slot picker, a promo code and a sticky checkout total.
- Category
- Checkout
- Platform
- iOS
Interactive screenClick through it, resize it, or switch states. It’s real UI, not a screenshot.Default state
Use this screen
Free to use. It works on its own in any React and Tailwind project, so you can add it with one command, paste the code, or hand the prompt to your coding agent.
FreeReact 18+Tailwind v3.4 or v4No extra packages
1. Add it with the shadcn CLI
npx shadcn@latest add https://www.thatdesignui.com/r/screens/basil-basket.json2. Use it
Every prop is optionalapp/page.tsx
import BasilCart from "@/components/basil-cart";
export default function Page() {
return <BasilCart />;
}Prefer to paste it yourself? Open the .
Under the hood
How it’s built
What’s inside
- A 390x844 iOS phone frame (44px radius, 10px #15241b border, deep shadow) centred on a sage #dfeadc page from the sm breakpoint; full-bleed below it. App background #f5f8f2, white 24px-radius cards with a hairline #e7ede4 ring, leafy green #1f7a4d as the brand colour, tomato red (#e5432f, #c2361f for text) as the accent, and a rounded system sans (ui-rounded first).
- A 9:41 status bar, a small leaf logo with 'Basil Market · Elm Row', and a 30px extrabold 'Your basket' title with the item count. A solid green free-delivery card reads 'Add $6.40 for free delivery' over a 10px progress bar with a small delivery-van marker riding the fill, plus a darker strip of one-tap top-ups (Lemons, Strawberries, Eggs).
- Five items with SVG-drawn produce on tinted 56px tiles (tomatoes, avocados, sourdough, oat milk, potted basil): name and line price on one row, unit below, then an 'Allow swap' toggle chip and a 40px pill stepper whose minus becomes a red bin at 1. Removing shows a dark toast with Undo for five seconds.
- A Substitutions card with an iOS switch that turns swaps on or off for every item ('Allowed for 4 of 5 items'), a Delivery slot card with horizontally scrolling 58x66 day chips and a two-column grid of 54px time slots (dashed and struck through when full, one per day badged 'Greener slot' with a leaf), and a Promo code field.
- An order summary (subtotal, delivery $3.99 or struck-through Free over $35, service fee $1.49, FRESH10 discount, total) and a sticky white bottom bar with the booked slot and a 56px green 'Checkout · $34.08' button that shows a spinner, then calls onContinue({ items, total, slot }).
How it behaves
- Rendered with no props the free-delivery card says 'Add $6.40 for free delivery' and the button says 'Checkout · $34.08'.
- Pressing + on any item updates its line price, the progress bar, the summary and the button total; crossing $35 shows 'Free delivery unlocked' and the delivery row turns to a struck-through $3.99 and 'Free'.
- At quantity 1 the minus button is a red bin; pressing it removes the item and shows a toast whose Undo puts it back in the same position.
- Entering FRESH10 adds a 10% discount row and an applied-code chip with Remove; any other code shakes the field and shows an inline red error announced as an alert.
- Full slots cannot be selected, exactly one slot per day carries the 'Greener slot' badge, and the bottom bar always shows the booked slot (for example 'Arrives Today, 5–6 pm').
- The Substitutions switch turns every item's 'Allow swap' chip on or off and the 'Allowed for n of 5 items' count follows per-item changes.
- Every control is reachable by keyboard with a visible green focus ring; nothing scrolls sideways at 375px and the checkout bar never hides content.
