common-intellisense
Version:
161 lines (160 loc) • 4.86 kB
JSON
{
"props": [
{
"Attribute": "children",
"Type": "`ReactNode`",
"Description": "The content of the input.",
"Default": "-"
},
{
"Attribute": "variant",
"Type": "`flat` | `bordered` | `faded` | `underlined`",
"Description": "The variant of the input.",
"Default": "`flat`"
},
{
"Attribute": "color",
"Type": "`default` | `primary` | `secondary` | `success` | `warning` | `danger`",
"Description": "The color of the input.",
"Default": "`default`"
},
{
"Attribute": "size",
"Type": "`sm` | `md` | `lg`",
"Description": "The size of the input.",
"Default": "`md`"
},
{
"Attribute": "radius",
"Type": "`none` | `sm` | `md` | `lg` | `full`",
"Description": "The radius of the input.",
"Default": "-"
},
{
"Attribute": "label",
"Type": "`ReactNode`",
"Description": "The content to display as the label.",
"Default": "-"
},
{
"Attribute": "value",
"Type": "`string`",
"Description": "The current value of the input (controlled).",
"Default": "-"
},
{
"Attribute": "defaultValue",
"Type": "`string`",
"Description": "The default value of the input (uncontrolled).",
"Default": "-"
},
{
"Attribute": "placeholder",
"Type": "`string`",
"Description": "The placeholder of the input.",
"Default": "-"
},
{
"Attribute": "description",
"Type": "`ReactNode`",
"Description": "A description for the input. Provides a hint such as specific requirements for what to choose.",
"Default": "-"
},
{
"Attribute": "errorMessage",
"Type": "`ReactNode`",
"Description": "An error message for the input.",
"Default": "-"
},
{
"Attribute": "startContent",
"Type": "`ReactNode`",
"Description": "Element to be rendered in the left side of the input.",
"Default": "-"
},
{
"Attribute": "endContent",
"Type": "`ReactNode`",
"Description": "Element to be rendered in the right side of the input.",
"Default": "-"
},
{
"Attribute": "labelPlacement",
"Type": "`inside` | `outside` | `outside-left`",
"Description": "The position of the label.",
"Default": "`inside`"
},
{
"Attribute": "fullWidth",
"Type": "`boolean`",
"Description": "Whether the input should take up the width of its parent.",
"Default": "`true`"
},
{
"Attribute": "isClearable",
"Type": "`boolean`",
"Description": "Whether the input should have a clear button.",
"Default": "`false`"
},
{
"Attribute": "isRequired",
"Type": "`boolean`",
"Description": "Whether user input is required on the input before form submission.",
"Default": "`false`"
},
{
"Attribute": "isReadOnly",
"Type": "`boolean`",
"Description": "Whether the input can be selected but not changed by the user.",
"Default": ""
},
{
"Attribute": "isDisabled",
"Type": "`boolean`",
"Description": "Whether the input is disabled.",
"Default": "`false`"
},
{
"Attribute": "isInvalid",
"Type": "`boolean`",
"Description": "Whether the input is invalid.",
"Default": "`false`"
},
{
"Attribute": "validationState",
"Type": "`valid` | `invalid`",
"Description": "Whether the input should display its \"valid\" or \"invalid\" visual styling. (**Deprecated**) use **isInvalid** instead.",
"Default": "-"
},
{
"Attribute": "disableAnimation",
"Type": "`boolean`",
"Description": "Whether the input should be animated.",
"Default": "`false`"
},
{
"Attribute": "classNames",
"Type": "`Record<\"base\"| \"label\"| \"inputWrapper\"| \"innerWrapper\"| \"mainWrapper\" | \"input\" | \"clearButton\" | \"helperWrapper\" | \"description\" | \"errorMessage\", string>`",
"Description": "Allows to set custom class names for the checkbox slots.",
"Default": "-"
}
],
"link": "https://nextui.org/docs/components/input",
"events": [
{
"Attribute": "onChange",
"Type": "`React.ChangeEvent<HTMLInputElement>`",
"Description": "Handler that is called when the element's value changes. You can pull out the new value by accessing `event.target.value` (string)."
},
{
"Attribute": "onValueChange",
"Type": "`(value: string) => void`",
"Description": "Handler that is called when the element's value changes."
},
{
"Attribute": "onClear",
"Type": "`() => void`",
"Description": "Handler that is called when the clear button is clicked."
}
]
}