Input

Base UI

A single-line text input with consistent states.

Your API key is encrypted and stored securely.

ReadyResponsive

Usage

Package export
tsx
"use client"

import {
  Field,
  FieldDescription,
  FieldLabel,
} from "@jnpll/elements-ui/field"
import { Input } from "@jnpll/elements-ui/input"

export function InputDemo() {
  return (
    <Field>
      <FieldLabel htmlFor="input-demo-api-key">API Key</FieldLabel>
      <Input id="input-demo-api-key" type="password" placeholder="sk-..." />
      <FieldDescription>
        Your API key is encrypted and stored securely.
      </FieldDescription>
    </Field>
  )
}

export default InputDemo;

Examples

Disabled state

This field is currently disabled.

API Reference

PropType / descriptionDefault
disabledboolean

Disables the control.

false
value / defaultValuestring

Controlled or initial input value.

-
classNamestring

Additional classes, merged with the component styles.

-

Composition & accessibility

Import the composition slots shown in the example. Keep labels and descriptions meaningful; interactive primitives provide keyboard and focus behavior. See the source for the complete typed API.