Input

Collects a single line of text or another native input value. Use it with a visible label and clear validation guidance.

React

Ready

Figma

React examples

In a field

A Field gives the input its label, its description and its invalid state.

Operators see this name on the map and in alerts.

Enter a full address, such as [email protected].

import { Field, FieldDescription, FieldLabel, Input, Stack } from "@kela-systems/ui-components";

export default function InputDefault() {
  return (
    <Stack gap={5} className="w-full max-w-xs">
      <Field>
        <FieldLabel htmlFor="camera-name">Camera name</FieldLabel>
        <Input id="camera-name" defaultValue="Camera 4" />
        <FieldDescription>Operators see this name on the map and in alerts.</FieldDescription>
      </Field>
      <Field data-invalid>
        <FieldLabel htmlFor="operator-email">Operator email</FieldLabel>
        <Input id="operator-email" type="email" defaultValue="noa@" aria-invalid />
        <FieldDescription>Enter a full address, such as [email protected].</FieldDescription>
      </Field>
      <Input aria-label="Sector" placeholder="Sector" disabled />
    </Stack>
  );
}

Props

Input

No props of its own. It also takes the attributes of the HTML element it renders.

Read this page as Markdown

Search ARK

Find a page, a primitive or a component.