component
A thin wrapper around the native <select> element with feedback color states, size variants, and prefix/suffix customization via passThrough. For a fully-styled, ListBox-powered select with multi-select chips and search-free option navigation, see Select.
Apply semantic feedback colors to indicate validation state or context.
---
import Select from "../select.astro";
import { stack } from "@pindoba/styled-system/patterns";
const items = [
{ label: "Apple", value: "apple" },
{ label: "Banana", value: "banana" },
{ label: "Cherry", value: "cherry" },
];
---
<div class={stack({ gap: "md", direction: "column" })}>
<Select feedback="neutral" items={items} />
<Select feedback="primary" items={items} />
<Select feedback="success" items={items} />
<Select feedback="danger" items={items} />
<Select feedback="warning" items={items} />
</div>---
import Select from "../select.astro";
import { stack } from "@pindoba/styled-system/patterns";
const items = [
{ label: "Apple", value: "apple" },
{ label: "Banana", value: "banana" },
{ label: "Cherry", value: "cherry" },
];
---
<div class={stack({ gap: "md", direction: "column" })}>
<Select size="sm" items={items} />
<Select size="md" items={items} />
<Select size="lg" items={items} />
</div>The passThrough prop provides escape hatches for each slot: style accepts a Panda CSS SystemStyleObject and props forwards arbitrary HTML attributes.
---
import Select from "../select.astro";
import { stack } from "@pindoba/styled-system/patterns";
const items = [
{ label: "Apple", value: "apple" },
{ label: "Banana", value: "banana" },
{ label: "Cherry", value: "cherry" },
];
---
<div class={stack({ gap: "md", direction: "column" })}>
<Select
items={items}
passThrough={{
root: { style: { borderRadius: "full" } },
}}
/>
<Select
items={items}
passThrough={{
select: { style: { fontStyle: "italic" } },
}}
/>
</div>"sunken"Background fill for the select wrapper.
Border style for the select wrapper.
"neutral"Semantic feedback color scheme. `neutral` is the default, `primary` uses the primary color, `success` green, `danger` red, and `warning` orange.
Per-slot style and attribute override bag. Each slot accepts a Panda `style` object and arbitrary HTML `props`.
Corner radius override. Without it the corner follows the size tier. `inner` renders a concentric corner computed from the nearest parent panel (parent radius − parent padding, floored at `xs`).
"md"Size variant of the select. `sm` is small, `md` is the default, and `lg` is large.
Plus all standard <select> HTML
attributes.