Inputs Demo contains a form using an input.
import { Input } from "@taystack/react-ui";
<Input />
prop | type | required | default |
label | String | [ ] | "" |
defaultValue | String | [ ] | "" |
style | Object | [ ] | {} see below |
inputStyle | Object | [ ] | {} see below |
error | Boolean | [ ] | false |
errorText | String | [ ] | "" see below |
label
StringIf present, will display a label for the input. Keep it short.
defaultValue
StringSets the input value to the String assigned.
Note: Changing this value will modify the value of this input.
style
ObjectThis will change the container styles. Useful for margin
.
inputStyle
ObjectThis will change the input styles. Use at your own risk.
error
BooleanShows the input in an error state if true.
errorText
StringUseful for displaying custom error messages for this input when error === true
.