BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/kokonut-ui/ai-input-search

AI Input Search

kokonut-ui/ai-input-search
FreeComponent

AI input with search mode.

Live preview

live · rendered by the registry
Rendered by kokonut-ui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://kokonutui.com/r/ai-input-search.json

Source

/components/kokonutui/ai-input-search.tsxkokonutui.com/r/ai-input-search.json · first 6 KB
1"use client";
2
3/**
4 * @author: @kokonutui
5 * @description: AI Input Search
6 * @version: 1.0.0
7 * @date: 2025-06-26
8 * @license: MIT
9 * @website: https://kokonutui.com
10 * @github: https://github.com/kokonut-labs/kokonutui
11 */
12
13import { Globe, Paperclip, Send } from "lucide-react";
14import { AnimatePresence, motion } from "motion/react";
15import { useState } from "react";
16import { Textarea } from "@/components/ui/textarea";
17import { useAutoResizeTextarea } from "@/hooks/use-auto-resize-textarea";
18import { cn } from "@/lib/utils";
19
20interface AIInputSearchProps {
21 placeholder?: string;
22 searchLabel?: string;
23 onSubmit?: (value: string) => void;
24 className?: string;
25}
26
27export default function AI_Input_Search({
28 placeholder = "Search the web...",
29 searchLabel = "Search",
30 onSubmit,
31 className,
32}: AIInputSearchProps) {
33 const [value, setValue] = useState("");
34 const { textareaRef, adjustHeight } = useAutoResizeTextarea({
35 minHeight: 52,
36 maxHeight: 200,
37 });
38 const [showSearch, setShowSearch] = useState(true);
39 const [isFocused, setIsFocused] = useState(false);
40
41 const handleSubmit = () => {
42 onSubmit?.(value);
43 setValue("");
44 adjustHeight(true);
45 };
46
47 const handleFocus = () => {
48 setIsFocused(true);
49 };
50
51 const handleBlur = () => {
52 setIsFocused(false);
53 };
54
55 const handleContainerClick = () => {
56 if (textareaRef.current) {
57 textareaRef.current.focus();
58 }
59 };
60
61 return (
62 <div className={cn("w-full py-4", className)}>
63 <div className="relative mx-auto w-full max-w-xl">
64 <div
65 aria-label="Search input container"
66 className={cn(
67 "relative flex w-full cursor-text flex-col rounded-xl text-left transition-all duration-200",
68 "ring-1 ring-black/10 dark:ring-white/10",
69 isFocused && "ring-black/20 dark:ring-white/20"
70 )}
71 onClick={handleContainerClick}
72 onKeyDown={(e) => {
73 if (e.key === "Enter" || e.key === " ") {
74 handleContainerClick();
75 }
76 }}
77 role="textbox"
78 tabIndex={0}
79 >
80 <div className="max-h-[200px] overflow-y-auto">
81 <Textarea
82 className="w-full resize-none rounded-xl rounded-b-none border-none bg-black/5 px-4 py-3 leading-[1.2] placeholder:text-black/70 focus-visible:ring-0 dark:bg-white/5 dark:text-white dark:placeholder:text-white/70"
83 id="ai-input-04"
84 onBlur={handleBlur}
85// … truncated

What it pulls in

npm packages

  • motion

Other registry items

  • textarea

Files it writes

  • components/kokonutui/ai-input-search.tsx
  • hooks/use-auto-resize-textarea.ts

Facts

Registry
kokonut-ui
Type
registry:component
Access
Free
Files written
2
Licence
the repository states none
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

Docs on kokonut-ui kokonutui.com kokonut-labs/kokonutui on GitHub Raw registry item This item as JSON

More from kokonut-ui

All 40 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Action Search Baraction-search-barkokonut-uiComponentsFree2 deps · 2 files
AI State Loadingai-loadingkokonut-uiComponentsFree1 dep
AI Input Selectorai-promptkokonut-uiComponentsFree2 deps · 4 files
AI Text Loadingai-text-loadingkokonut-uiComponentsFree1 dep
AI Voiceai-voicekokonut-uiComponentsFree2 deps
Apple Activity Cardapple-activity-cardkokonut-uiComponentsFree1 dep
Magnet Buttonattract-buttonkokonut-uiComponentsFree2 deps
Avatar Pickeravatar-pickerkokonut-uiComponentsFree2 deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex