Text Input Component

Text Input component is an input field for capturing a short text input from user. Bissetii did a number of researches on its own and decided to only provide styling for proper HTML5 semantic syntax defined by w3.org.

This component is available starting from v1.12.1.

Hugo

All Text Input Hugo interface is directly supported by Form Component.

Go

All Text Input Go interface is directly supported by Form Component.

HTML

Expanding from Form Component, Text Input component is to facilitate an input for entering a short text.

To ensure the accepted text is complying to your specific pattern, use a regular expression pattern for pattern= attribute. Most browsers will perform native validation and Bissetii styles each of its state seamlessly.

Example, for alphanumeric with space pattern:

  1. 8 characters minimum: ([A-z0-9À-ž\s]){8,}
  2. 16 characters maximum:([A-z0-9À-ž\s]){,16}
  3. 8 minimum and 16 maximum: ([A-z0-9À-ž\s]){8,16}

Another example, for alphanumeric and symbol pattern (e.g. use in password) with minimum 8 and 16 maximum characters, 1 lowercase a-Z, 1 uppercase A-Z, 1 number, and 1 symbol:

1
^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[\(!@#\$%\^&\*\)]).{8,16}

An all compatible attributes HTML syntax is shown as follows:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
<label for="input-javascript-id">Text</label>
<input type="text"
	id="input-javascript-id"
	name="example"
	value="...YOUR TEXT VALUE..."
	pattern="...YOUR PATTERN..."
	minlength="8"
	maxlength="40"
	spellcheck
	placeholder="...YOUR PLACEHOLDER..."
	required
	disabled
	autofocus
	autocomplete
	readonly
	list="datalist-id"
/>
<datalist id="datalist-id">
	<option value="...OPTION 1 TEXT..." label="Label 1" />
	...
</datalist>

Here is an example:

CSS

All Text Input CSS variables is directly supported by Form Component.

Javascript

All Text Input Javascript is directly supported by Form Component.

Sass

All Text Input Sass is directly supported by Form Component.

Researches

Here are the researches done to ensure Text Input component meets the necessary quality assurances:

SCHEDULED COMING SOON

Epilogue

That’s all about Text Input component in Bissetii. If you need more feature or need to report a bug, please feel free to file an issue at our Issue Section.