Host
Where it lives
Addon and field share one hairline.
https://
Joins a text field with a prefix or suffix inside one 1px border.
Where it lives
Addon and field share one hairline.
Three ways in. They share one source, so the pixels match whichever you pick.
npm install @noorddev/vlak-react
// once, next to your app's root
import "@noorddev/vlak-react/css";
import { Input, InputAddon, InputGroup } from "@noorddev/vlak-react";Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/input-group.
npx @noorddev/vlak-cli add input-group
The StyleX leaf lands in components/vlak/ with its dependencies, for your own compiler to own. See StyleX.
npx shadcn add https://vlak.dev/r/input-group.json
The same registry item, installed by shadcn's CLI.
<link rel="stylesheet" href="node_modules/@noorddev/vlak/css/vlak.css" />
No React. Link vlak.css and use the markup and classes below.
import { Input, InputAddon, InputGroup } from "@noorddev/vlak-react";
<InputGroup>
<InputAddon>https://</InputAddon>
<Input placeholder="vlak.dev" aria-label="Site" />
</InputGroup>
<InputGroup end>
<Input placeholder="0.00" aria-label="Amount" />
<InputAddon>EUR</InputAddon>
</InputGroup>Also accepts HTMLAttributes<HTMLSpanElement>.
Addon and field share one control boundary.
| Prop | Type | Default | Description |
|---|---|---|---|
end | boolean | Place the addon after the field. |
Also accepts HTMLAttributes<HTMLDivElement>.
<div class="rs-input-group"><span class="rs-input-addon">https://</span><input class="rs-input" placeholder="vlak.dev" /></div>