Field

A label that starts in the field and sits on the border when you type. TextField and TextArea.

Install

npx @neelshha/ui@latest init
npx @neelshha/ui@latest add field

Placeholder

The name is gone the moment you type.

Error

A sentence under the field. Height is reserved so the form does not jump.

API

PropTypeNotes
labelReactNodeRequired. The name of the field.
chrome"float" | "placeholder"Float keeps the name. Placeholder drops it when you type.
optionalbooleanRenders an Optional mark on the label.
descriptionReactNodeHelp under the field. Hidden when error is set.
errorReactNodeA sentence. The field height does not jump.
disabledbooleanDashed border. Native disabled.
readOnlybooleanDotted border. Native readOnly.