advanced

Native Select

HTML native select with styling.

Preview

A preview of the Native Select component with interactive controls.

Preview Code
Interactive

Installation

Add the Native Select component to your project.

Bash
ng g @ng-cn/core:c native-select

Usage

Import and use the Native Select component in your Angular application.

Template TypeScript
template.html
<div class="grid w-full max-w-sm gap-1.5">
  <Label for="framework">Framework</Label>
  <NativeSelect id="framework">
    <option value="">Select a framework</option>
    <option value="angular">Angular</option>
    <option value="react">React</option>
    <option value="vue">Vue</option>
    <option value="svelte">Svelte</option>
  </NativeSelect>
</div>

Examples

Explore different variations and use cases for the Native Select component.

Basic

Preview Code
Interactive

API Reference

Props
Prop Type Default Description
class string Additional CSS classes.