Introducing PrimeReact v11-alpha 🎉Discover Now

InputText

InputText is an extension to standard input element with icons and theming.

Used as the display name across your workspace
preview

Installation#

npx shadcn@latest add @primereact/ui/inputtext

Usage#

import { InputText } from '@/components/ui/inputtext';
<InputText placeholder="Enter text" />

Examples#

Filled#

Specify the variant property as filled to display the component with a higher visual emphasis than the default outlined style.

filled-demo

Sizes#

InputText provides small and large sizes as alternatives to the base by setting the size property.

sizes-demo

Invalid#

Invalid state is displayed using the invalid prop to indicate a failed validation. You can use this style when integrating with form validation libraries.

invalid-demo

Disabled#

When disabled is present, the element cannot be edited and focused.

disabled-demo