Floating Label in Blazor TextArea Component
14 Jun 20241 minute to read
The floating label functionality in the TextArea Component allows the placeholder text to float above the TextArea while the user interacts with it, providing a more intuitive user experience. This feature can be achieved using the FloatLabelType API, which offers various options for defining the floating behavior:
Type | Description |
---|---|
Auto | The label floats above the TextArea when it receives focus or input, returning to its initial position when the TextArea loses focus and contains no value. |
Always | The label always remains floating above the TextArea, regardless of user interaction. |
Never | The label never floats; it remains in its default position within the TextArea. |
<SfTextArea Placeholder='Enter the Address' FloatLabelType='@FloatLabelType.Auto'></SfTextArea>
