Articles in this section
Category / Section

How to use HTML textbox as Syncfusion textbox

1 min read

Using Normal Textboxes as Syncfusion Ttextboxes

 

In an application or a webpage, you may can use normal textboxes along with the other Syncfusion components, sincecomponents since there is no separate EJplugin or EJHelpers for textboxes.

So, you may want to make a normal textbox to look like Syncfusion textbox in order to achieve uniform look and appearance in your webpage.To achieve uniform look and appearance in your webpage, you should make a normal textbox to look like Syncfusion textbox.

This can be achieved executed by adding the ‘e-textbox’ class to the HTML element or helpers.

By adding this class, the textbox will have standard look and appearance as other components for all the themes supported by Syncfusion.

Code snippet

JS

 
<input type="text" class="e-textbox" value="This is a normal Textbox"/>
 

 

MVC

 
@Html.TextBox("textbox", "This is a normal Textbox", new { @class = "e-textbox"})
 

 

Webforms

 
<asp:TextBox runat="server" CssClass="e-textbox">This is a Normal Textbox</asp:TextBox>
 

 

The Textbox will be rendered as shown below.in the following:

Normal textbox

Using Normal Textboxes as Syncfusion Textboxes with AnimationUsing Normal Textboxes as Syncfusion Textboxes with Animation.

 

 

We have provided tThe animation support for Material Theme is provided for EJ components. We can provide an animation supportIt can be provided for normally contracted input by constructing the new span element and adding the ‘e-animation’ class to the corresponding input. Please check the below following code block.

 

HTML

  
<input id="demo" class="e-textbox e-animation" placeholder="Enter your name" />
  <span class="e-ripple-bar"></span>
 

 

MVC

 
@Html.TextBox("textbox", "This is a normal Textbox", new { @class = "e-textbox e-animation"})
<span class="e-ripple-bar"></span>

 

Webforms

 
<asp:TextBox runat="server" CssClass="e-textbox e-animation">This is a Normal Textbox</asp:TextBox>
<span class="e-ripple-bar"></span>

 

Sample Location

 

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied