How to create new type element to form API? Drupal form API provides some built in type of element to build a form. But I want to create other type such as: 

$form['mail']['#type'] = 'email';


And the output I want it to be:

&lt;input class="input-1" type="email" id="edit-mail" name="mail" maxlength="128"&gt;


So, how can i do that?
You need to implement hook_element_info(). See the 
form_example_elements.inc file from the Example: Form API module, and the Creating Custom Elements documentation guide.

Note that the Elements module already provides a form element type for HTML5 mail inputs.