logo

Aki UI

アキ ウイ

Action Search Bar

アクションサーチバー

A field that opens a list of actions underneath itself as you type. It is not the Combobox, which holds a value in a popover, and not the Command Palette, which takes over the page on ⌘K — this one stays in the layout and hands the chosen action back to you. Filtering runs on a copy of the query held back by a timer, so the list stops reshuffling under a fast typist, and aria-activedescendant↗↗ moves the highlight while the input keeps real focus, which is what lets arrow keys work without the caret ever leaving the field. Adapted from Kokonut UI↗↗ under the MIT licence.

Installation

Copy and paste the following code into a new component file:1

"use client"

/**
* Adapted for Aki UI from Kokonut UI's Action Search Bar.
* Original author: @dorianbaffier — https://kokonutui.com
* Copyright (c) 2025 kokonutUI, MIT License.
* https://github.com/kokonut-labs/kokonutui
*
* Reworked here onto the local palette, with the shadcn Input removed,
* the use-debounce hook inlined and motion/react swapped for framer-motion.

How to use it2

"use client"

import { PlaneTakeoff } from "lucide-react"
import { ActionSearchBar } from "@/components/ui/action-search-bar"

const actions = [
{ id: "flights", label: "Book a flight", icon: <PlaneTakeoff className="h-4 w-4" />, description: "Travel", shortcut: "⌘B", category: "Agent" },
]

export default function Page() {

Props

ActionSearchBar

NameDefaultDescription
actions—

SearchAction[]

Rows to search through

label"Search commands"

string

Label above the field

placeholder"What do you need?"

string

Placeholder inside the field

delay200

number

Milliseconds the filter lags the input by

onSelect—

(action: SearchAction) => void

Fired when a row is chosen

darkfalse

boolean

Render the dark palette

SearchAction

NameDefaultDescription
id—

string

Unique key, also used for the option id

label—

string

Row title, matched against the query

icon—

ReactNode

Leading glyph

description—

string

Secondary text, also matched

shortcut—

string

Keys shown on the right

category—

string

Trailing tag, also matched