Componentform0.56 KB gzipZero dependencies

Input Group

Input with prefix icon slot, suffix slot, and inner action button; dashed focus ring and animated underline sweep.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add input-group

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { InputGroup } from "@/components/ui/input-group"; <InputGroup placeholder="Search tickets" prefix={<SearchIcon />} suffix={<ClearButton />} />

Source code

input-group.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxinput-group.tsx64 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export type InputGroupProps = {  children?: React.ReactNode;  className?: string;  placeholder?: string;}; const InputGroup = React.forwardRef<HTMLDivElement, InputGroupProps>(  ({ children, className, placeholder }, ref) => {    return (      <div        ref={ref}        className={cn(          "relative flex h-10 w-full rounded-md border border-input bg-background px-3 py-1.5 placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-input transition-colors",

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { InputGroup } from "@/components/ui/input-group"; <InputGroup />
PropTypeDescription
childrenReact.ReactNodeChild elements rendered inside the component.
classNamestringOptional Tailwind or custom CSS classes merged with component styles.
placeholderstringInput placeholder.