component

Select (native)

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.

Feedback

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>

Size

---
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>

Custom Styling

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>
props · 6 shown · 6 total
background
"surface.peak""surface.hill""surface.base""surface.valley""surface.ground""transparent"
default "sunken"

Background fill for the select wrapper.

border
"none""bold""default""muted""accent"

Border style for the select wrapper.

feedback
"primary""neutral""success""warning""danger""inherit"
default "neutral"

Semantic feedback color scheme. `neutral` is the default, `primary` uses the primary color, `success` green, `danger` red, and `warning` orange.

passThrough
SelectPassThrough< RootElementAttributes, SelectElementAttributes, OptionElementAttributes >

Per-slot style and attribute override bag. Each slot accepts a Panda `style` object and arbitrary HTML `props`.

radius
"sm""md""lg""xl""2xl""none""xs""3xl""4xl""5xl""6xl""full""2xs""inner""inherit"

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`).

size
"sm""md""lg"
default "md"

Size variant of the select. `sm` is small, `md` is the default, and `lg` is large.

Plus all standard <select> HTML attributes.

Type

  • Components
  • Blocks