A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://coreui.io/react/docs/forms/input/ below:

React Form Input Component - CoreUI

React Form Input Component Form control

React input components. Give textual form `<input>`s an upgrade with custom styles, sizing, focus states, validation, and more.

Other Frameworks

CoreUI components are available as native Angular, Bootstrap (Vanilla JS), and Vue components. To learn more please visit the following pages.

Example#

If you need to add custom classNames to form's components, or need to add some custom elements you can add each form component separately. Please check the example below.

<CForm>

<CFormLabel htmlFor="exampleFormControlInput1">Email address</CFormLabel>

<CFormInput type="email" id="exampleFormControlInput1" placeholder="[email protected]" aria-describedby="exampleFormControlInputHelpInline" />

<CFormText as="span" id="exampleFormControlInputHelpInline">

Must be 8-20 characters long.

</CFormText>

</CForm>

Sizing#

Set heights using size property like size="lg" and size="sm".

Disabled#

Add the disabled boolean attribute on an input to give it a grayed out appearance and remove pointer events.

Readonly#

Add the readOnly boolean attribute on an input to prevent modification of the input's value. Read-only inputs appear lighter (just like disabled inputs), but retain the standard cursor.

Readonly plain text#

If you want to have <input readonly> elements in your form styled as plain text, use the plainText boolean property to remove the default form field styling and preserve the correct margin and padding.

File input#

Default file input example

Multiple files input example

Disabled file input example

Small file input example

Large file input example

Color# API#

Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4