variant-selector-multiple-ex-01
stackzero/variant-selector-multiple-ex-01FreeExample
stackzero publishes no description for this item.
Install it
npx shadcn@latest add https://ui.stackzero.co/r/variant-selector-multiple-ex-01.jsonSource
1"use client";23import * as React from "react";4import VariantSelectorMultiple, {5 VariantItem,6} from "@/components/commerce-ui/variant-selector-multiple";78const variants: VariantItem[] = [9 {10 id: "damage-protection",11 label: "Damage Protection",12 value: "damage-protection",13 },14 {15 id: "extended-warranty",16 label: "Extended Warranty",17 value: "extended-warranty",18 },19 {20 id: "theft-protection",21 label: "Theft Protection",22 value: "theft-protection",23 },24];2526export default function VariantSelector_Basic_Ex_01() {27 const [selectedVariant, setSelectedVariant] = React.useState<string[]>([28 "extended-warranty",29 ]);3031 return (32 <div className="space-y-8">33 <fieldset className="space-y-4">34 <legend className="mb-2 text-sm font-medium">Select Size:</legend>35 <VariantSelectorMultiple36 values={selectedVariant}37 onValuesChange={setSelectedVariant}38 variants={variants}39 />40 </fieldset>41 </div>42 );43}
What it pulls in
npm packages
Other registry items
Files it writes
More from stackzero
All 112 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| address-02-block-exaddress-02-block-ex | stackzero | Examples | Free | 2 deps | |
| cart-01-block-excart-01-block-ex | stackzero | Examples | Free | 1 dep | |
| face-rating-basic-ex-01face-rating-basic-ex-01 | stackzero | Examples | Free | 1 dep | |
| face-rating-basic-ex-02face-rating-basic-ex-02 | stackzero | Examples | Free | 1 dep | |
| face-rating-basic-ex-03face-rating-basic-ex-03 | stackzero | Examples | Free | 1 dep | |
| face-rating-gradient-ex-01face-rating-gradient-ex-01 | stackzero | Examples | Free | 1 dep | |
| image-carousel-basic-ex-01image-carousel-basic-ex-01 | stackzero | Examples | Free | 1 dep | |
| image-carousel-basic-ex-02image-carousel-basic-ex-02 | stackzero | Examples | Free | 1 dep |
