Command Palette

Search for a command to run...

Input

Displays a form input field or a component that looks like an input field.

Usage

import { Input } from "@smartacteam/ambient-web/input";
<Input.Text />
<Input.Numeric />
<Input.Pattern />

Examples

Sizes

Numeric

import { Input } from "@smartacteam/ambient-web/input";
<Input.Numeric />

Pattern

import { Input } from "@smartacteam/ambient-web/input";
<Input.Pattern />

Autofill

An input with no autocomplete token asks browsers and password managers to leave it alone: it renders autoComplete="off" and the 1Password, Bitwarden, and LastPass ignore attributes. These are requests each browser and manager honors on its own terms, and a manager outside those three reads none of them. The default suits a field holding someone else's details: a customer, an invitee, a company record, a search box.

A field that holds the signed-in user's own details names its token, and renders that token alone:

<Input.Text type="tel" autoComplete="tel" />
<Input.Text autoComplete="given-name" />
<Input.Text type="password" autoComplete="current-password" />

An input the package does not render spreads autofillAttributes() from @smartacteam/ambient-web/input.