shadcn.io is an independent project built on shadcn/ui
Installation
Overview
Sell a collectible by its condition with this collectible product card for Svelte with Ark UI. A hairline frame with a plus mark on each corner holds two cells with a divider between them. The start cell draws a trading card in a numbered case at 5:7, with a label strip, an art window with a fox head and three lines of text; a soft glint sweeps across it when you hover, in CSS only and off under reduced motion. The end cell has a Badge for the set, the name, a Toggle Group of grades 7, 8, 9 and 10 that re-prices the card, a list of facts (the condition, "188 graded at 9", five rarity pips and how many were graded in all), a "Verified" line with the case number, a "How grading works" button that opens a Popover and the one Shine Button, "Add to bag". Nothing is stored or bought. For trading cards, coins, comics and any collectible sold by grade.
FAQ
How do I change the grades?
Edit GRADES. Each has an id (the grade), a condition word, the price in cents, how many were graded and the caseNumber printed on the label. The group, the facts and the card's label strip are all generated from it, so a card can have two grades or six.
How are the rarity pips worked out?
From the count, not typed. pipsOf lights five pips at 60 copies or fewer, four up to 250, three up to 500, two up to 800 and one above that, and the scarcity word comes from the same number. The pips are decorative; the text beside them says "Rare, 4 of 5".
What is the glint, and does it work without a mouse?
A pseudo-element with a diagonal gradient that slides across the card on hover, with no script. It is decoration only, so keyboard and touch users miss nothing, and it is hidden when the visitor prefers reduced motion.
What stays local, and how do I wire it for real?
The grade and the bag are page state; nothing is stored, charged or sent. The population counts, prices and case numbers are typed, so load them from your inventory. Replace the body of add and undo with your cart calls. The card is typed shapes: swap Slab for an img of the case.





