DaisySelect

Overview

DaisySelect

DaisySelect is a styled ComboBox with 9 variants and 4 size presets. It provides a chevron toggle, placeholder text, and themed dropdown. Use it for single-select dropdowns that need DaisyUI styling.

Variant Options

Variant Description
Bordered (default) Subtle base-300 border; brightens on focus.
Ghost Borderless, transparent background; adds light fill on hover.
Primary / Secondary / Accent Colored borders.
Info / Success / Warning / Error Semantic border colors.

Size Options

Size Height Font Size
ExtraSmall 24 10
Small 32 12
Medium (default) 48 14
Large 64 18
NOTE
DaisySelect uses fixed heights for each size to match DaisyUI's design.

Quick Examples

<!-- Basic -->
<controls:DaisySelect PlaceholderText="Pick one">
    <ComboBoxItem>Han Solo</ComboBoxItem>
    <ComboBoxItem>Greedo</ComboBoxItem>
</controls:DaisySelect>

<!-- Ghost + primary -->
<controls:DaisySelect Variant="Ghost" PlaceholderText="Ghost">
    <ComboBoxItem>Option 1</ComboBoxItem>
</controls:DaisySelect>
<controls:DaisySelect Variant="Primary" PlaceholderText="Primary">
    <ComboBoxItem>Option 1</ComboBoxItem>
</controls:DaisySelect>

<!-- Compact -->
<controls:DaisySelect Size="Small" PlaceholderText="Small">
    <ComboBoxItem>A</ComboBoxItem>
    <ComboBoxItem>B</ComboBoxItem>
</controls:DaisySelect>

Tips & Best Practices

Localization Refresh (DaisySelectItem)

DaisySelectItem is a DependencyObject and does not live in the visual tree, so bindings that rely on a parent DataContext can fail to refresh when the page resets DataContext (e.g., during runtime language changes). This can result in empty dropdown rows even though the items are still present. Recommended pattern: set a localization source on the select and provide localization keys on each item. DaisySelect will resolve and refresh item text whenever the localization source raises PropertyChanged (or when you call RefreshLocalization()).
<controls:DaisySelect LocalizationSource="{x:Bind Localization, Mode=OneWay}">
    <controls:DaisySelectItem LocalizationKey="Gallery_Carousel_Mode_Manual" Tag="Manual" />
    <controls:DaisySelectItem LocalizationKey="Gallery_Carousel_Mode_Slideshow" Tag="Slideshow" />
</controls:DaisySelect>
Notes: