A thin wrapper around the native <select> element with tone 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 tone colors to indicate validation state or context.
---
// GENERATED from packages/demos/select-native/tone.demo.tsx — edit the source, not this file.
import SelectNative from "@pindoba/astro-select-native";
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" })}>
<SelectNative tone="neutral" items={items} />
<SelectNative tone="primary" items={items} />
<SelectNative tone="success" items={items} />
<SelectNative tone="danger" items={items} />
<SelectNative tone="warning" items={items} />
</div>---
// GENERATED from packages/demos/select-native/size.demo.tsx — edit the source, not this file.
import SelectNative from "@pindoba/astro-select-native";
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" })}>
<SelectNative size="sm" items={items} />
<SelectNative size="md" items={items} />
<SelectNative 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.
---
// GENERATED from packages/demos/select-native/custom.demo.tsx — edit the source, not this file.
import SelectNative from "@pindoba/astro-select-native";
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" })}>
<SelectNative
items={items}
passThrough={{
root: { style: { borderRadius: "full" } },
}}
/>
<SelectNative
items={items}
passThrough={{
select: { style: { fontStyle: "italic" } },
}}
/>
</div>