Documentation
01
See it in context
Preview
02
Copy a working example
Usage
---
import { NativeSelect } from '@santi020k/lumen-astro'
---
<div style="display: grid; gap: 0.75rem; max-width: 20rem;">
<label for="ex-native-select-plan">Plan</label>
<NativeSelect id="ex-native-select-plan" name="plan" placeholder="Choose a plan">
<option value="free">Free</option>
<option value="pro">Pro</option>
<option disabled value="enterprise">Enterprise (contact sales)</option>
<option value="team">Team</option>
</NativeSelect>
<label for="ex-native-select-billing">Billing period</label>
<NativeSelect
id="ex-native-select-billing"
name="billing"
options={['Monthly', 'Yearly']}
placeholder="Choose a billing period"
size="sm"
/>
<label for="ex-native-select-region">Region</label>
<NativeSelect
disabled
id="ex-native-select-region"
name="region"
options={['North America', 'Europe']}
placeholder="Locked to workspace"
size="lg"
/>
</div>---
import { NativeSelect } from '@santi020k/lumen-astro'
---
<div style="display: grid; gap: 0.75rem; max-width: 20rem;">
<label for="ex-native-select-plan">Plan</label>
<NativeSelect id="ex-native-select-plan" name="plan" placeholder="Choose a plan">
<option value="free">Free</option>
<option value="pro">Pro</option>
<option disabled value="enterprise">Enterprise (contact sales)</option>
<option value="team">Team</option>
</NativeSelect>
<label for="ex-native-select-billing">Billing period</label>
<NativeSelect
id="ex-native-select-billing"
name="billing"
options={['Monthly', 'Yearly']}
placeholder="Choose a billing period"
size="sm"
/>
<label for="ex-native-select-region">Region</label>
<NativeSelect
disabled
id="ex-native-select-region"
name="region"
options={['North America', 'Europe']}
placeholder="Locked to workspace"
size="lg"
/>
</div>import { NativeSelect } from '@santi020k/lumen-react'
export const Example = () => (
<>
<div style={{ display: 'grid', gap: '0.75rem', maxWidth: '20rem' }}>
<label htmlFor="ex-native-select-plan">Plan</label>
<NativeSelect id="ex-native-select-plan" name="plan" placeholder="Choose a plan">
<option value="free">Free</option>
<option value="pro">Pro</option>
<option disabled value="enterprise">Enterprise (contact sales)</option>
<option value="team">Team</option>
</NativeSelect>
<label htmlFor="ex-native-select-billing">Billing period</label>
<NativeSelect
id="ex-native-select-billing"
name="billing"
options={['Monthly', 'Yearly']}
placeholder="Choose a billing period"
size="sm"
/>
<label htmlFor="ex-native-select-region">Region</label>
<NativeSelect
disabled
id="ex-native-select-region"
name="region"
options={['North America', 'Europe']}
placeholder="Locked to workspace"
size="lg"
/>
</div>
</>
)import { NativeSelect } from '@santi020k/lumen-react'
export const Example = () => (
<>
<div style={{ display: 'grid', gap: '0.75rem', maxWidth: '20rem' }}>
<label htmlFor="ex-native-select-plan">Plan</label>
<NativeSelect id="ex-native-select-plan" name="plan" placeholder="Choose a plan">
<option value="free">Free</option>
<option value="pro">Pro</option>
<option disabled value="enterprise">Enterprise (contact sales)</option>
<option value="team">Team</option>
</NativeSelect>
<label htmlFor="ex-native-select-billing">Billing period</label>
<NativeSelect
id="ex-native-select-billing"
name="billing"
options={['Monthly', 'Yearly']}
placeholder="Choose a billing period"
size="sm"
/>
<label htmlFor="ex-native-select-region">Region</label>
<NativeSelect
disabled
id="ex-native-select-region"
name="region"
options={['North America', 'Europe']}
placeholder="Locked to workspace"
size="lg"
/>
</div>
</>
)<script type="module">
import { defineLumenElements } from '@santi020k/lumen-elements/define'
defineLumenElements()
</script>
<div style="display: grid; gap: 0.75rem; max-width: 20rem;">
<label for="ex-native-select-plan">Plan</label>
<lumen-native-select id="ex-native-select-plan" name="plan" placeholder="Choose a plan">
<option value="free">Free</option>
<option value="pro">Pro</option>
<option disabled value="enterprise">Enterprise (contact sales)</option>
<option value="team">Team</option>
</lumen-native-select>
<label for="ex-native-select-billing">Billing period</label>
<lumen-native-select
id="ex-native-select-billing"
name="billing"
options={['Monthly', 'Yearly']}
placeholder="Choose a billing period"
size="sm"></lumen-native-select>
<label for="ex-native-select-region">Region</label>
<lumen-native-select
disabled
id="ex-native-select-region"
name="region"
options={['North America', 'Europe']}
placeholder="Locked to workspace"
size="lg"></lumen-native-select>
</div><script type="module">
import { defineLumenElements } from '@santi020k/lumen-elements/define'
defineLumenElements()
</script>
<div style="display: grid; gap: 0.75rem; max-width: 20rem;">
<label for="ex-native-select-plan">Plan</label>
<lumen-native-select id="ex-native-select-plan" name="plan" placeholder="Choose a plan">
<option value="free">Free</option>
<option value="pro">Pro</option>
<option disabled value="enterprise">Enterprise (contact sales)</option>
<option value="team">Team</option>
</lumen-native-select>
<label for="ex-native-select-billing">Billing period</label>
<lumen-native-select
id="ex-native-select-billing"
name="billing"
options={['Monthly', 'Yearly']}
placeholder="Choose a billing period"
size="sm"></lumen-native-select>
<label for="ex-native-select-region">Region</label>
<lumen-native-select
disabled
id="ex-native-select-region"
name="region"
options={['North America', 'Europe']}
placeholder="Locked to workspace"
size="lg"></lumen-native-select>
</div>03
Choose your target
Add this component
Choose the package for your runtime. All adapters share the Lumen stylesheet. Use the matching registry command when you want a local wrapper for that framework.
pnpm add @santi020k/lumen-astropnpm add @santi020k/lumen-astrolumen add NativeSelectlumen add NativeSelectpnpm add @santi020k/lumen-reactpnpm add @santi020k/lumen-reactlumen add NativeSelect --target reactlumen add NativeSelect --target reactpnpm add @santi020k/lumen-elementspnpm add @santi020k/lumen-elementslumen add NativeSelect --target elementslumen add NativeSelect --target elementsAPI reference
Lumen-specific props and runtime attributes for the Astro primitive. React props follow the same names; Elements use equivalent kebab-case attributes where custom elements expose them.
| Attribute | Values | Default | Description |
|---|---|---|---|
| options | Array<string | { label, value, disabled? }> | [] | Creates native option elements. |
| placeholder | string | - | Adds a disabled placeholder option. |
| size | "default" | "sm" | "lg" | "default" | Controls select height and font size. |
| class, className | string | "" | Merges custom classes with the generated ui-* root classes. |
| ...native attributes | HTML attributes | - | Forwards standard attributes to the root element unless the component consumes them. |