GitHub

Select

Dropdown selection with items binding, enum support, and multi-select.

<rhx-select>

Examples

Basic

Enum Binding

With Clear

Child Options

Multi-select

Sizes

htmx Integration

Select a country to see cities...

Properties

Property Type Default Description
rhx-for ModelExpression - ASP.NET Core model expression for two-way binding
name string - The form field name
value string - The current value
rhx-label string - Label text displayed above the select
rhx-hint string - Hint text displayed below the select
rhx-size string medium Select size: small, medium, large
rhx-disabled bool false Whether the select is disabled
rhx-required bool false Whether the field is required
rhx-placeholder string - Placeholder text when no selection
rhx-items List<SelectListItem> - Server-side items to render as options
rhx-multiple bool false Allow multiple selections
rhx-with-clear bool false Show a clear button when a value is selected
rhx-filled bool false Use filled appearance

Accessibility

  • Renders a native <select> element with full keyboard support.
  • Label is associated via for/id pairing.
  • Required and disabled states are conveyed natively.
  • Multi-select uses aria-multiselectable.