Skip to content

shadcn.io is an independent project built on shadcn/ui

Chocolate Product Card Block for Solid

Three single-origin chocolate bars compared two at a time: a five-axis flavour radar overlays the chosen origins, one solid and one dashed, with cacao, weight and price listed under it.

UI library: Ark UI

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

Let shoppers compare flavours before they buy with this chocolate product card for Solid with Ark UI. A hairline frame with a plus mark on each corner holds a five-axis flavour radar (fruity, floral, nutty, earthy, roasted) and a cell with the chosen bars. A multiple Toggle Group at the end of the header picks origins (Madagascar 72%, Ecuador 65%, Peru 55%), at most two: the first pick draws as a solid outline and the second as a dashed one, and a third pick is refused in words, with the status line saying which to turn off first. Under the radar a list gives each bar's cacao, weight and price, and each chosen bar is drawn in greyscale with an outline Button that says "Add to bag" and an Undo. Nothing is stored or bought. On a phone the radar comes first and the bars follow. Guides rule the bands. For chocolate makers and any product that is tasted before it is chosen.

FAQ

How do I change the origins?

Edit ORIGINS. Each has the cacao percent, the five flavour levels from 0 to 5 in the order of AXES, a price in cents, the bar weight in grams and a line of tasting notes. The radar polygons, the list and the bars are all built from those rows.

Why only two at a time?

Two shapes on one radar stay readable; three do not. The limit is MOST. A third pick changes nothing and the status line says to turn one off. Turning the last one off is refused too, so there is always a shape to read.

Can a screen reader get the radar?

The drawing has a text equivalent: its label reads out every level for every chosen origin, and the list under it repeats the facts. The solid and dashed lines are named in the list too, so nothing depends on seeing the line style.

What stays local, and how do I wire it for real?

The chosen origins and the bag are page state. The bag is page state; nothing is stored, charged or sent. Replace the body of add and undo with calls to your cart. The picture is typed shapes: swap Picture for an img of the product.

How does it look on a phone?

One column: the radar, then the list, then the bars side by side with their buttons. The comparison toggles drop under the sentence.

Is it accessible?

The origins are a named group of toggle buttons that works with the arrow keys, the radar has a written equivalent, line styles are named, and every pick or refusal is announced by the polite status line.