🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
category: Forms
Single-line text field. Transparent fill, 1px neutral-800 border, 4.8px radius, placeholder in neutral-400, and a 1px neutral-300 ring on focus. Use it for every free-text, number, URL and password field in settings and dialogs; pair it with Label above via htmlFor.
Parts: Input only. It forwards every native <input> prop (type, placeholder, defaultValue, disabled, aria-invalid, ref).
Conventions:
inputSize="default"(36px, 14px text) for forms;inputSize="sm"(28px, 12px text) for toolbar filters and table headers.isSearchrenders a leading lucideSearchicon and pads the text past it. Use it for every "Search / Filter …" box.aria-invalid="true"turns the border red; put the error text in atext-xs text-red-400line below.disableddrops the field to 50% opacity. Width comes from the container: it isw-full, so constrain withclassName="w-32"or a grid.- Stack
Label+Inputin agrid gap-1.5; usegrid grid-cols-2 gap-3for side-by-side fields. PreferTextareafor multi-line,Selectfor enumerations.
<div className="grid gap-1.5">
<Label htmlFor="domain">Domain</Label>
<Input id="domain" placeholder="example.com" defaultValue="tomato.gg" />
</div>
<Input isSearch inputSize="sm" placeholder="Search pages…" />
<div className="grid gap-1.5">
<Input aria-invalid="true" defaultValue="not a domain" />
<p className="text-xs text-red-400">Enter a valid domain, like tomato.gg</p>
</div>