I'm in the process of creating a component derived from SfTextBox to set certain properties!
I adjusted the style, the height of SfTextBox was set to 40px and colors were defined.
The following problem still exists, the floating label is not placed correctly, it is too close to the top edge,
and if there is an icon in the text box on the left, then it will be moved.
In addition, the label is not displayed vertically centered within the text box (see image)
In my opinion there is a problem with the processing of images within the text box. Whenever an image is added via "AddIconAsync", the layout is no longer displayed correctly. Especially in connection with the floting label, as can be seen in the picture, the Focus line can be seen twice!
Hi Klaus Kirchhoff,
Thank you for reaching out to us.
Instead of manually setting the height for the component, we provide a direct option to adjust the size of the TextBox component. You can make the TextBox appear small, normal, or bigger by using the corresponding CssClass. To display the TextBox in a larger size, you can apply the e-bigger class to the component.
Code Snippet:
|
<SfTextBox @ref=@TextBoxObj Placeholder="Demo" Width="200px" CssClass="e-bigger" Created="@AddDateIcon" ></SfTextBox>
|
Additionally, we have prepared a sample that demonstrates how to append and prepend a date icon to the TextBox component. You can explore the sample using the link below:
Sample: https://blazorplayground.syncfusion.com/VNrfChsmLBxKgiNs
For more details about sizing the TextBox component, you can refer to our official documentation:
Documentation: https://blazor.syncfusion.com/documentation/textbox/sizing
Regards,
Yohapuja S