Skip to content

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

Drone Product Card Block for Ark UI

A folding camera drone drawn over three battery slots, a one-to-three battery stepper that fills a flight-time bar in 34-minute segments and works out weight and price with the third battery 20 percent off.

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 size the battery kit with this drone product card for React with Ark UI. A hairline frame with a plus mark on each corner holds a wide tile: a greyscale folding drone drawn over three battery slots and, in a side cell with its own divider, the name, Rating stars, a wind badge with a Tooltip and a stepper of two icon buttons that sets one to three batteries. Each battery fills a slot on the drawing and a segment of the flight-time bar, 34 minutes at a time (34, 68, 102 min). The carry weight and the price are worked out from the count in integer cents, and the third battery is 20 percent off. The single Shine Button says "Add to bag" with the price and turns into "Added" with an Undo; a polite status line says what changed. Nothing is stored or bought. For product pages where an accessory changes the answer.

FAQ

How are the time, weight and price worked out?

From the count and four constants: MINUTES per battery, DRONE_GRAMS and BATTERY_GRAMS, and DRONE_CENTS, BATTERY_CENTS and THIRD_PERCENT for money. The third battery costs BATTERY_CENTS * 80 / 100 cents. Everything is integer cents; the display adds decimals only when the amount has cents.

What happens at one and at three batteries?

The buttons stay enabled and the status line says why nothing changed ("The kit carries 3 batteries at most"). This keeps keyboard focus where it was instead of dropping it when a button disables.

Why is the wind rating in a tooltip?

The badge says "Wind level 5" and the tooltip adds the gust speed. It is on a real button, so it takes focus and opens from the keyboard as well as on hover.

How is the flight bar read by a screen reader?

As one image named with the numbers ("Flight time 68 minutes of 102"); the segments are decoration. The same minutes appear as text beside it and in the status line.

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

The battery count and the bag are page state; nothing is stored, charged or sent. Replace the body of add and undo with calls to your cart and send the battery count with the line item. Flight time is a typed per-battery figure here; use the maker's tested number.

How does it look on a phone?

The drone and its slots come first, then the name, the stepper, the flight bar and the price stacked under it, with the divider turned into a rule across the top of the second cell.