Input

A single line of text, with a Label that names it.

Example

tsx
<Stack gap="xs" style={{ maxWidth: "20rem" }}>
  <Label htmlFor="email">Email</Label>
  <Input id="email" type="email" placeholder="you@example.com" />
</Stack>

Usage

Pages are built on the server: import the tags from @dash/server and return the tree. The browser runtime draws it.
tsx
import { Input, Label, Stack } from "@dash/server";

Props

InputProps

Also takes everything Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "defaultValue"> does.
Prop
Type
Description
placeholderstring
valuestring | number
defaultValuestring | number
disabledboolean
onChange(e: React.ChangeEvent<HTMLInputElement>) => void
onKeyDown(e: React.KeyboardEvent<HTMLInputElement>) => void
onBlur(e: React.FocusEvent<HTMLInputElement>) => void
aria-invalidboolean

LabelProps

Prop
Type
Description
htmlForstring
PreviousButton
On this page