SearchField (ui/search-field.tsx)

collie · web/src/components/ui/search-field.tsx · typescript · MIT
ui

Module exposing: SearchField

// Source: https://github.com/AltanS/collie | License: MIT | Copyright 2026 Altan Sarisin
// Provided via justclaw.it.com; keep this notice with the code.
import { forwardRef } from "react";
import type { ChangeEvent } from "react";
import { Search } from "lucide-react";

import { cn } from "@/lib/utils";

export interface SearchFieldProps {
  value: string;
  onChange: (value: string) => void;
  /** ALREADY TRANSLATED. Shown while the field is empty. */
  placeholder: string;
  /** ALREADY TRANSLATED. The field's accessible name, when the placeholder is not enough of one. */
  label?: string;
  className?: string;
}

/**
 * The one search box: a 44px text field with a magnifier inside its left edge, for a list the person
 * narrows by typing. The command palette's and the Sent sheet's.
 *

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key