Input
A black text field with a gray frame that turns white on focus.
https://
Shown on your public profile.
Install and use
The first command adds the component and the Mine theme, the second adds this example. Render <Mine> once near your root for the skin, sounds and narrator.
"use client"
import { Field, FieldDescription, FieldLabel } from "@/components/ui/field"
import { Input, InputClear, InputGroup } from "@/components/ui/input"
import { XIcon } from "lucide-react"
import { useLog } from "@/demos/log"
function Example() {
const log = useLog()
return (
<Field name="website">
<FieldLabel>Website</FieldLabel>
<InputGroup>
<span>https://</span>
<Input
placeholder="example.com"
defaultValue="hollisgrant.com"
onValueChange={(value, details) =>
log(`${value ? `“${value}”` : "Empty"} (${details.reason})`)
}
/>
<InputClear aria-label="Clear website">
<XIcon aria-hidden="true" />
</InputClear>
</InputGroup>
<FieldDescription>Shown on your public profile.</FieldDescription>
</Field>
)
}
export { Example }