ClayInput is exported from the @clayui/form package, consisting of some low-level utilities that provides the ability to create Inputs and Input Groups.
import{Provider}from'@clayui/core';importForm,{ClayInput}from'@clayui/form';importReact,{useState}from'react';import'@clayui/css/lib/css/atlas.css';exportdefaultfunctionApp(){return(<Providerspritemap="/public/icons.svg"><divclassName="p-4"><Form.Group><labelhtmlFor="basicInputText">Name</label><ClayInputid="basicInputText"placeholder="Insert your name here"type="text"/></Form.Group></div></Provider>);}
Using another elements as an input
If you want to use another component instead of input for enter text typed things, you can just pass this tag to component property, like the example below:
import{Provider}from'@clayui/core';importForm,{ClayInput}from'@clayui/form';importReact,{useState}from'react';import'@clayui/css/lib/css/atlas.css';exportdefaultfunctionApp(){return(<Providerspritemap="/public/icons.svg"><divclassName="p-4"><Form.Group><labelhtmlFor="basicInputText">Name</label><ClayInputcomponent="textarea"id="basicInputText"placeholder="Insert your name here"type="text"/></Form.Group></div></Provider>);}