Skip to content

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

Yoga Mat Product Card Block for Svelte

A yoga mat where thickness is a trade-off: 3, 5 or 6 mm redraws a side-on slab under a knee and moves cushion, stability and packed size meters that pull against each other.

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

Show what a thicker product costs you with this yoga mat product card for Svelte with Ark UI. A Segment Group picks 3, 5 or 6 mm; the mat is redrawn as a side-on slab with a knee pressing into it, sinking deeper as the mat gets thicker, and three five-dot meters (cushion, stability, packed size) trade against each other. Weight, rolled width and the price follow the thickness, all typed. One Shine Button adds the mat at that price. Guides rule the bands. Add turns into "Added" with an Undo, the heading row's "Bag" count follows and a polite status line says what changed. Nothing is stored or bought. For mats, pillows, mattresses and anything where more of one quality costs another.

FAQ

How do I change the thicknesses?

Edit THICKNESSES: each has a label, millimetres, the three meter values from 1 to 5, the knee sink in millimetres, weight in tenths of a kilogram, the rolled width and the price in cents. The slab is drawn at three units a millimetre.

Why do the meters trade against each other?

A thicker mat is softer and bulkier but less steady underfoot, so cushion and packed size rise while stability falls. The values are typed so you can set your own.

Are the dots the only way to read a meter?

No. The dots are decoration; each meter also has a text value such as "4 of 5" that screen readers read, and the status line reads all three when you change the thickness.

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

The thickness and the bag are page state; nothing is stored, charged or sent. Replace the body of add and undo with calls to your cart.

Does anything animate?

Only the meter dots change colour, over a short fade that is switched off under reduced motion.

How does it look on a phone?

The slab comes first, then the name, price, thickness choice, meters and facts in one column.