Input

A standard text input field for form data.

Installation

Import the component from the passport-ui package.

components/example.tsx
1
2
import { Input } from "passport-ui";
import { Label } from "passport-ui";

Usage

Basic example showing how to use the component.

components/example.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<div className="w-sm">
<div className="meta-container">
<Label htmlFor="email">Email Address</Label>
<Input
id="email"
type="email"
placeholder="hello@example.com"
/>
</div>
</div>
{/* Different input types */}
<Input type="password" placeholder="Enter password" />
<Input type="number" placeholder="Enter number" />
<Input type="search" placeholder="Search..." />
{/* Disabled state */}
<Input disabled placeholder="Disabled input" />

Additional resources

Documentation and examples are available in Storybook.