{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "select-example", "title": "Select", "registryDependencies": [ "button", "dialog", "field", "input", "item", "native-select", "select", "example" ], "files": [ { "path": "registry/radix-vega/examples/select-example.tsx", "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-vega/components/example\"\nimport { Button } from \"@/registry/radix-vega/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-vega/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/radix-vega/ui/field\"\nimport { Input } from \"@/registry/radix-vega/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/radix-vega/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-vega/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-vega/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n return (\n \n \n \n )\n}\n\nfunction SelectWithIcons() {\n return (\n \n
\n \n \n
\n
\n )\n}\n\nfunction SelectWithGroups() {\n return (\n \n \n \n )\n}\n\nfunction SelectLargeList() {\n return (\n \n \n \n )\n}\n\nfunction SelectSizes() {\n return (\n \n
\n \n \n
\n
\n )\n}\n\nfunction SelectWithButton() {\n return (\n \n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n )\n}\n\nfunction SelectItemAligned() {\n return (\n \n \n \n )\n}\n\nfunction SelectWithField() {\n return (\n \n \n Favorite Fruit\n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n return (\n \n
\n \n \n Favorite Fruit\n \n \n \n
\n
\n )\n}\n\nfunction SelectInline() {\n return (\n \n
\n \n \n \n Sort by\n Name\n Date\n Status\n \n
\n
\n )\n}\n\nfunction SelectDisabled() {\n return (\n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n const [plan, setPlan] = React.useState(plans[0].name)\n\n const selectedPlan = plans.find((p) => p.name === plan)\n\n return (\n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n \n \n {plan.name}\n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectInDialog() {\n return (\n \n \n \n \n \n \n \n Select Example\n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n )\n}\n", "type": "registry:example" } ], "type": "registry:example" }