Input
A native single-line form control with shared sizes and focus styling.
Installation
Import from the Reflow workspace package.
Playground
Open demoimport { Input } from '@rtzll/reflow'
import { type Handle } from 'remix/component'
export function Example(handle: Handle) {
return () => (
<>
<Input name="displayName" aria-label="Display name" />
</>
)
}With Field
import { Field, Input } from '@rtzll/reflow'
import { type Handle } from 'remix/component'
export function Example(handle: Handle) {
return () => (
<>
<Field label="Email" description="Use your work email.">
{(control) => <Input {...control} type="email" placeholder="you@company.com" />}
</Field>
</>
)
}Invalid
import { Input } from '@rtzll/reflow'
import { type Handle } from 'remix/component'
export function Example(handle: Handle) {
return () => (
<>
<Input aria-label="Email" aria-invalid="true" defaultValue="invalid email" />
</>
)
}Disabled
import { Input } from '@rtzll/reflow'
import { type Handle } from 'remix/component'
export function Example(handle: Handle) {
return () => (
<>
<Input aria-label="Email" defaultValue="you@company.com" disabled />
</>
)
}Types
import { Input } from '@rtzll/reflow'
import { type Handle } from 'remix/component'
export function Example(handle: Handle) {
return () => (
<>
<Input type="password" aria-label="Password" placeholder="Password" />
<Input type="number" aria-label="Seats" placeholder="Seats" min="1" />
<Input type="file" aria-label="Attachment" />
</>
)
}API Reference
Public props for the Reflow implementation. Native controls also accept their standard HTML attributes and Remix event mixes.
Input
| Prop | Type | Default | Description |
|---|---|---|---|
children | RemixNode | — | Child nodes to render inside the element. |
disabled | boolean | — | The `disabled` HTML attribute. |
name | string | — | The `name` HTML attribute. |
type | "number" | "hidden" | "color" | "button" | "search" | "checkbox" | "radio" | "date" | "time" | "text" | "submit" | "reset" | "range" | "email" | "image" | "tel" | "url" | "datetime-local" | "file" | "month" | "password" | "week" | — | Single or multiple expansion mode. |
value | string | number | — | The `value` HTML attribute. |
checked | boolean | — | The `checked` HTML attribute. |
defaultChecked | boolean | — | The `defaultChecked` HTML attribute. |
defaultValue | string | number | — | The `defaultValue` HTML attribute. |
indeterminate | boolean | — | The `indeterminate` HTML attribute. |
placeholder | string | — | The `placeholder` HTML attribute. |
required | boolean | — | The `required` HTML attribute. |
size | "default" | "compact" | — | Control density or icon-button dimensions. |