Loading...
Please waitLoading...
Please waitpnpm dlx uselab@latest add use-input-value
import * as React from "react"
import { useInputValue } from "@/hooks/use-input-value"
export function Component() {
const name = useInputValue("useKit")
return (
<div>
<input
style={{
borderRadius: "0.5rem",
backgroundColor: "rgba(229, 231, 235, 0.2)",
border: "1px solid rgba(229, 231, 235, 0.2)",
}}
{...name}
/>
<p>Hello, {name.value}!</p>
</div>
)
}| Name | Type | Description | Default Value | Optional |
|---|---|---|---|---|
initial | string | number | boolean | null | undefined | The initial value of the input. | "" | Yes |
| Name | Type | Description |
|---|---|---|
value | string | The current value of the input. |
onChange | React.ChangeEventHandler | The event handler to update the value of the input. |
Hello, useKit!