Component docs
Loading
import { HiddenField } from "@pixxl-tools/components";
// In Server Components:
import { HiddenField } from "@pixxl-tools/components/server";| Prop | Type | Default | Description |
|---|---|---|---|
children | Renderable | — | Rendered content. |
...props | HTMLAttributes | — | Native DOM props. |
value | string | number | string[] | — | Controlled value. |
defaultValue | string | number | string[] | — | Initial uncontrolled value. |
onValueChange | (value) => void | — | Canonical value callback. |
invalid | boolean | false | Marks field as invalid. |
disabled | boolean | false | Disables interaction. |
size | "xs" | "sm" | "md" | "lg" | md | Control size. |
childrenRenderable
Rendered content.
...propsHTMLAttributes
Native DOM props.
valuestring | number | string[]
Controlled value.
defaultValuestring | number | string[]
Initial uncontrolled value.
onValueChange(value) => void
Canonical value callback.
invaliddefault falseboolean
Marks field as invalid.
disableddefault falseboolean
Disables interaction.
sizedefault md"xs" | "sm" | "md" | "lg"
Control size.
Other props are passed to the root element (InputHTMLAttributes<HTMLInputElement>), including className, style, id and aria-* attributes.
<HiddenField name="mode" />