Skip to content
daisyBlazor

FloatingLabel

daisyUI's floating label: wrap any input and its label sits inside as a placeholder, then floats above once the field is focused or filled.
Data input.floating-label
Cover · <FloatingLabel>

Examples

Basic

Wrap a native input; give it a placeholder so the label knows when the field is empty.

Ana Silva <no email>

website/Examples/DataInput/FloatingLabelBasicExample.razor Source

Sizes

The label follows the input's size class (input-sm, input-lg).

website/Examples/DataInput/FloatingLabelSizesExample.razor Source

With a select

Works around a select, too.

Plan: pro

website/Examples/DataInput/FloatingLabelSelectExample.razor Source

API

<FloatingLabel>

DaisyBlazor

Parameters

  • Label string
    = null

    The floating label text displayed above the input when focused or filled.

  • Class string
    = null

    Additional CSS classes merged onto the floating-label element.

  • Style string
    = null

    Inline styles applied to the floating-label element.

Content

  • ChildContent RenderFragment

    The input element (or any form control) to wrap with the floating label.

Something went wrong while running the docs. Reload