• 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

Input Components

Input components.




Input


Usage

Example

Please enter your email
Please enter your password

Script


  return (
    <CContainer>
      <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>
  )
  


# Features

  • All-in-one input components
  • Components share similar API
  • Use as basic or advanced customized inputs

# Input API

NameRequiredTypeDefault Value
plaintextboolean
plain text mode
typestringtext
type of input tag
sizestring
sizeHtml(string | number)



InputFile


# InputFile API

NameRequiredTypeDefault Value
customboolean



InputCheckbox


# InputCheckbox API

NameRequiredTypeDefault Value
customboolean



InputRadio




InputGroup


Usage

Example

Username

Script


  return (
    <div className={'mt-2 col-6'}>
      <CInputGroup>
        <CInputGroupPrepend>
          <CInputGroupText className={'bg-info text-white'}>
            Username
          </CInputGroupText>
        </CInputGroupPrepend>
        <CInput type="email" id="username" name="username" autoComplete="name"/>
        <CInputGroupAppend>
          <CInputGroupText className={'bg-info text-white'}>
            <CIcon name={'cilUser'}/>
          </CInputGroupText>
        </CInputGroupAppend>
      </CInputGroup>
    </div>
  )
  


# InputGroup API

NameRequiredTypeDefault Value
classNamestring
user classes for the main HTML tag
innerRef(object | Function | string)
ref to the main tag
sizestring
input size



InputGroupAddon


# InputGroupAddon API

NameRequiredTypeDefault Value
childrenany
children components
classNamestring
user classes for the main HTML tag
innerRef(object | Function | string)
ref to the main tag
prependboolean
set the position of addon to prepend (normally append)



InputGroupText


# InputGroupText API

NameRequiredTypeDefault Value
taganydiv
main HTML tag name
classNamestring
user classes for the main HTML tag
innerRef(object | Function | string)
ref to the main tag



Textarea


# Textarea API

NameRequiredTypeDefault Value
plaintextboolean
sizestring



Label


Usage

Example


Script


  return (
    <div>
      <CFormGroup>
        <CLabel htmlFor="name">Name</CLabel>
        <CInput id="name" placeholder="Enter your name" required />
      </CFormGroup>
    </div>
  )
  


# Label API

NameRequiredTypeDefault Value
taganylabel
main HTML tag name
childrenany
children components
classNamestring
user classes for the main HTML tag
innerRef(object | Function | string)
ref to the main tag
hiddenboolean
set to hidden
variant(custom-file | checkbox | custom-checkbox)
col(string | boolean)

  • Components
    • Usage
      • Features
      • API
    • Related
      • -Input
      • CInput
      • CInputFile
      • CInputCheckbox
      • CInputRadio
      • CInputGroup
      • CInputGroupAddon
      • CInputGroupText
      • CTextarea
      • CLabel
CoreUI © 2020 creativeLabs.core-logo