Atoms / Search box

Search box

The magnifier, the query and the shortcut that reaches it.

import { SearchBox } from "@forgeron/ui";
/01 → Default
/⌘K
import { SearchBox } from "@forgeron/ui";

export default function Default() {
  return (
    <div style={{ display: "grid", gap: 12, width: 320 }}>
      <SearchBox placeholder="Search issues" shortcut="/" />
      <SearchBox placeholder="Search or run a command" shortcut={["⌘", "K"]} />
    </div>
  );
}
API → Props
PropTypeDefaultDescription
shortcutstring | string[]—Keys shown at the end.
...restInputHTMLAttributes—placeholder, value, onChange…
classNamestring—Extra classes.