Color picker row with circular palette swatches, a ringed check on the selected color, and a diagonal line over sold-out options.
Requires shadcn/ui initialized. Run npx shadcn@latest init if you haven't.
import { Commerce2 } from "@/components/beste/piece/commerce2";
<Commerce2
title="Color"
selected="Tan"
swatches={[
{
"color": "black",
"label": "Black"
},
{
"color": "white",
"label": "Ivory"
},
{
"color": "tan",
"label": "Tan"
},
{
"color": "navy",
"label": "Navy"
},
{
"color": "olive",
"label": "Olive",
"soldOut": true
},
{
"color": "burgundy",
"label": "Burgundy"
}
]}
/>