• Getting Started
  • Components
  • Github
  • Go pro
energyGetting started
  • Introduction
dComponents
  • Button Components
  • Grid Components
  • Input Components
  • Layout Components
  • Toast Components
  • Widget Components
  • Alert
  • Badge
  • Breadcrumb
  • Callout
  • Card
  • Carousel
  • Charts
  • Collapse
  • CreateElement
  • DataTable
  • Dropdown
  • ElementCover
  • Embed
  • Fade
  • Form
  • Icon
  • Img
  • Jumbotron
  • Link
  • ListGroup
  • Media
  • Modal
  • Nav
  • Navbar
  • Pagination
  • Popover
  • Progress
  • Spinner
  • Switch
  • Tabs
  • Toggler
  • Tooltip

Form

React forms support the following form controls: input, textarea, button, checkbox, radio, and select. Learn how to build various types of form layouts such as vertical form, horizontal form and inline from quickly and easily with the CoreUI.


Usage

Example

Please enter your email
Please enter your password

Script


  return (
    <CContainer fluid>
      <CRow>
        <CCol sm="12">
          <CForm action="" method="post">
            <CFormGroup>
              <CLabel htmlFor="nf-email">Email</CLabel>
              <CInput
                type="email"
                id="nf-email"
                name="nf-email"
                placeholder="Enter Email.."
                autoComplete="email"
              />
              <CFormText className="help-block">Please enter your email</CFormText>
            </CFormGroup>
            <CFormGroup>
              <CLabel htmlFor="nf-password">Password</CLabel>
              <CInput
                type="password"
                id="nf-password"
                name="nf-password"
                placeholder="Enter Password.."
                autoComplete="current-password"
              />
              <CFormText className="help-block">Please enter your password</CFormText>
            </CFormGroup>
          </CForm>
        </CCol>
      </CRow>
    </CContainer>
  )
  


# Form API

NameRequiredTypeDefault Value
taganyform
main HTML tag name
childrenany
children components
classNamestring
user classes for the main HTML tag
innerRef(object | Function | string)
ref to the main tag
inlineboolean
set inline style of the form.
wasValidatedboolean
adds initial validation to the form



FormFeedback


# FormFeedback API

NameRequiredTypeDefault Value
childrenany
children components
classNamestring
user classes for the main HTML tag
innerRef(object | Function | string)
ref to the main tag
validboolean
set valid state
tooltipboolean
set validation mode (from feedback) to tooltip



FormGroup


# FormGroup API

NameRequiredTypeDefault Value
childrenany
children components
classNamestring
user classes for the main HTML tag
innerRef(object | Function | string)
ref to the main tag
rowboolean
set the type of the group to row
variant(checkbox | custom-checkbox | custom-radio)
set the variant of form group
inlineboolean
inline mode
disabledboolean
set state to disabled



FormText


# FormText API

NameRequiredTypeDefault Value
taganysmall
main HTML tag name
childrenany
children components
classNamestring
user classes for the main HTML tag
innerRef(object | Function | string)
ref to the main tag
colorstringmuted
set text color

  • Components
    • Usage
      • Features
      • API
    • Related
      • CForm
      • CFormFeedback
      • CFormGroup
      • CFormText
CoreUI © 2020 creativeLabs.core-logo