@foundationcomponentrepo/text-field
v0.5.0
Published
Base text-field component for foundation
Downloads
1
Readme
@foundationcomponentrepo/text-field
Base text-field component for foundation
Props
type: 'text' | 'password' | 'number' | 'email';
The type
prop corresponds to the type of the input/text-field
phase?: string
The phase
prop represents the different states of text-field
The phases of a text-field are:
default - Default text-field
success - text-field for correct/successful input
invalid - text-field for invalid input.
error - text-field for invalid input. However, the invalid status is not visible when focused.
id?: string
The id
prop is to set the id
attribute to the input/text-field
name?: string
The name
prop is to set the name
attribute to the input/text-field
value?: string
The value
prop is to set the value
attribute to the input/text-field
placeholder?: string
The placeholder
prop is to set the placeholder
attribute to the input/text-field
required?: boolean
The required
prop is to set the required
attribute to the input/text-field
disabled?: boolean
The disabled
prop is to set the disabled
attribute to the input/text-field
onChange?: (e: any) => void
The onChange
prop is to perform any action on the change of the content in text-field
Install
npm install --save @foundationcomponentrepo/text-field
License
MIT © unplatforms