Input
Accepts text input from users.
import { Input } from "stylus-ui/Input";
export default () => <Input />;Sizing
Section titled “Sizing”When displaying an input in a space-constrained location, you can pass small.
import { Input } from "stylus-ui/Input";
export default () => <Input small />;Errors
Section titled “Errors”When displaying an error message, pass error to highlight the input in red.
import { Input } from "stylus-ui/Input";
export default () => <Input error />;Labels
Section titled “Labels”Most inputs should also provide a label for accessibility. Import <Label>.
import { Input } from "stylus-ui/Input";import { Label } from "stylus-ui/Label";
export default () => ( <Label className="flex flex-col gap-2"> Email address <Input type="email" /> </Label>);Placeholders
Section titled “Placeholders”Placeholder text may be used to provide an example of input to the user.
import { Input } from "stylus-ui/Input";import { Label } from "stylus-ui/Label";
export default () => ( <Label className="flex flex-col gap-2"> Email address <Input type="email" placeholder="alan@scribehow.com" /> </Label>);Disabled
Section titled “Disabled”import { Input } from "stylus-ui/Input";import { Label } from "stylus-ui/Label";
export default () => ( <Label className="flex flex-col gap-2"> Email address <Input type="email" placeholder="alan@scribehow.com" disabled /> </Label>);API Reference
Section titled “API Reference”Inherits properties from HTMLInputElement.