Inputs and selection
Input
always with Label
function InputDemo() { return ( <View className="w-full gap-3"> <View className="gap-2"> <Label htmlFor="ks-email">Email</Label> <Input id="ks-email" keyboardType="email-address" textContentType="emailAddress" autoComplete="email" placeholder="you@example.com" /> </View> <Input placeholder="Disabled" editable={false} /> </View> );}Usage
Pair every Input with a Label. Inputs stretch to their container.
API
<Label htmlFor /> + <Input id placeholder keyboardType size?="sm|md|lg" … />Get it
Already in every copy of the native kit:
import { Input } from '@/components/ui/input';Details
- Exports
Input- Installs with
- @halftone-native/lib-component-classes, @halftone-native/lib-palette-context, @halftone-native/lib-theme, @halftone-native/lib-utils, @halftone-native/text
- Also searched as
- text field, textfield, form
- Registry JSON
- /r/native/input.json
<div className="grid w-full max-w-sm gap-4"> <div className="grid gap-2"> <Label htmlFor="demo-email">Email</Label> <Input id="demo-email" type="email" placeholder="you@example.com" /> </div> <div className="grid gap-2"> <Label htmlFor="demo-name">Workspace name</Label> <Input id="demo-name" aria-invalid defaultValue="a" aria-describedby="demo-name-error" /> <p id="demo-name-error" className="text-destructive text-sm"> At least 3 characters. </p> </div> <Input disabled placeholder="Disabled" aria-label="Disabled field" /></div>API
<Label htmlFor="email">Email</Label><Input id="email" type="email" inputSize?="sm|md|lg" />Get it
Already in every copy of the web kit:
import { Input } from '@/components/ui/input';Details
- Exports
Input- Packages
- cn@^0.5.2
- Also searched as
- text field, form field
- Registry JSON
- /r/web/input.json
Agents: the whole registry is at /llms.txt.