SnowballSH Foundation UI

Input

Pick a framework. Both use the same recipe, so the styling matches exactly.

Input props for React
PropTypeDefaultDescription
invalidbooleanfalseMarks the value as invalid and turns the border red.

Also takes className and children. Anything else passes through to the input.

input.demo.tsx
import { Input } from "../react/index.js";

export default function InputDemo() {
  return (
    <div className="flex max-w-sm flex-col gap-3">
      <Input placeholder="Your name" aria-label="Your name" />
      <Input placeholder="Disabled" aria-label="Disabled" disabled />
      <Input placeholder="Invalid value" aria-label="Invalid value" invalid />
    </div>
  );
}