Skip to content
v0.2.10

Input

A native input with semantic styling and independent visual sizing.

Preview

Use Input

Input is a named export of @flood-md/react. Connect the package once, then import what you use.

First time here? Connect Flood
Example import style
input.tsxTSX
"use client";

import { FloodRoot, Field, Input } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <Field label="Workspace name">
        {(control) => <Input {...control} defaultValue="My project" />}
      </Field>
    </FloodRoot>
  );
}

Design notes

  • Use Field or a native associated label; placeholder text is not a label.
  • controlSize changes appearance. The native numeric size attribute keeps its HTML meaning.
  • Default outlines use the quiet field.border role. field.boundary is a stronger opt-in; preserve the independent focus indicator when customizing colors.

API reference

PropValuesDefault
status"error" | "warning" | "success" | "info"—
invalidboolean—
controlSize"sm" | "md" | "lg" | "xl""md"
Native HTML propsInputHTMLAttributes<HTMLInputElement>Forwarded
View TypeScript source