text
Native text behavior with a visible label. Validation and mobile keyboard behavior follow the input type.
type="text"
WelkUI!REACT EDITIONExplore live variants, compare states, and learn every prop. Pick a component to start.
A labeled native text-like input with comic framing. Supports common text types and an optional end-action button, such as showing a password or clearing a search. Keep controlled value and onChange in sync.
import { WelkInput } from "@welkui/react";
<WelkInput label="Hero name" placeholder="Captain Welk" />Import @welkui/react/styles.css once in your app. Stateful snippets belong inside a React component.
These are real components, not screenshots. Compare their appearance and try the controls. Key props below each preview show what changes; use the usage example above for imports and component setup.
Native text behavior with a visible label. Validation and mobile keyboard behavior follow the input type.
type="text"Native email behavior with a visible label. Validation and mobile keyboard behavior follow the input type.
type="email"Native password behavior with a visible label. Validation and mobile keyboard behavior follow the input type.
type="password"Native search behavior with a visible label. Validation and mobile keyboard behavior follow the input type.
type="search"Native tel behavior with a visible label. Validation and mobile keyboard behavior follow the input type.
type="tel"Native url behavior with a visible label. Validation and mobile keyboard behavior follow the input type.
type="url"Use the trailing action to show or hide the password without changing its value.
endAction={{ icon, label, onClick }}Native disabled field; excluded from form submission.
disabledThe value can still be focused and copied, but not edited.
readOnlyRequired props are marked in the default column. Other props are optional. ReactNode accepts text or JSX.
| Prop | Type | Default | Description |
|---|---|---|---|
label | ReactNode | Required | Visible, accessible control label. |
type | "text" | "email" | "password" | "search" | "tel" | "url" | "text" | Native text-input behavior. |
endAction | { icon: ReactNode; label: string; onClick: MouseEventHandler<HTMLButtonElement>; disabled?: boolean } | Unset | Optional trailing action; label names the icon button. |
value / defaultValue | Native input value | Native defaults | Controlled or initial input content. |
onChange | ChangeEventHandler<HTMLInputElement> | Unset | Native text change event. |
Inherits native input props except the fields replaced by this component's API: name, id, disabled, required, form, onBlur, onFocus, className, style, aria-* and data-* are supported. Forwards an input ref. children is omitted and type is restricted to the listed text-like types.
Import @welkui/react/styles.css once in your app entry or Next.js root layout. The previews use the default theme; override --welk-* CSS tokens in your app to customize it.
For Next.js, put hooks and event handlers in a component beginning with "use client". Keep state local to the component using the control. The library preserves its client boundaries and uses your installed React version.
Use defaultValue or defaultChecked for uncontrolled fields, or a state value and its change callback for controlled fields. Do not switch between these modes during the lifetime of a field.
Modal and notification examples start closed: use their Try buttons to see them. Disabled examples are deliberately non-interactive. Validate forms, uploads, authentication, and server responses in your application; these components only provide UI.