Skip to content
Back

AI search barPro

One search card for an app or docs: grouped results as you type, an Ask AI row first; Tab streams a short answer whose numbered citations light their result below.

oxyn add ai-search-bar
Claude Sonnet 4.5Reading results…
Docs
Webhook retriesBackoff schedule and limits
Webhook event typesPayloads for every event
Issues
AUTH-912 Webhooks to Acme return 504In progress
Customers
Acme CorpEnterprise · 3 webhook endpoints$48k ARR
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • Search over docs, customers and issues where a short synthesized answer is often better than ten links, but the links must stay one step away.

When not to use

  • A ⌘K palette with an AI mode: use AI command instead.
  • A search input whose clear button scales in inside a reserved slot so the width never shifts: use Search field instead.
  • Cited sources under an answer: use Source cards instead.

Installation

AI search bar is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add ai-search-bar

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Answer

Answer with citation badges.

Claude Sonnet 4.5Reading results…
Docs
Webhook retriesBackoff schedule and limits
Webhook event typesPayloads for every event
Issues
AUTH-912 Webhooks to Acme return 504In progress
Customers
Acme CorpEnterprise · 3 webhook endpoints$48k ARR
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Results

Results with the Ask AI row.

Docs
Webhook retriesBackoff schedule and limits
Webhook event typesPayloads for every event
Issues
AUTH-912 Webhooks to Acme return 504In progress
Customers
Acme CorpEnterprise · 3 webhook endpoints$48k ARR
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Empty

Recent searches and suggested questions.

Recent
Ask AI
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

AiSearchBar

PropTypeDefaultDescription
resultsrequiredVec<Command>—Results (group = section).
recentVec<String>Default::default()Recent searches.
suggestionsVec<String>Default::default()Suggested questions.
modelString"Claude Sonnet"Model name.
placeholderString"Search docs, customers and issues"Placeholder.
queryStringDefault::default()Initial query.
autoplayboolDefault::default()Answer on mount for the initial query (demo).
answerrequiredScriptedAnswer—The answer (citations map to result ids through its sources).
heightf32320.0Body height px.
widthf32600.0Width px.
nowrequiredClockMs—Clock.
on_selectEventHandler<String>—A result opened.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
↑or↓Move (wraps)
EnterOpen, fill a recent search or ask
TabAsk AI about the query
EscClose the answer, then clear

Accessibility

  • Combobox with grouped options; each result's citation badge is labelled "Cited as n".
  • Hovering or focusing a citation lights its result.
From the spec

The field is a combobox; results are options in labelled groups; the answer region is busy while streaming; citations and badges are labelled.

Motion & interaction

The card keeps its size; the answer slides in above the results. Hovering or focusing a citation lights the result it points to.

Timing
TransitionDurationEasingReduced motion
Answer in200 msease.outinstant
Stream~45 chars / slinearfull text
Citation light160 mslinearsame

Responsive behaviour

  • 100 % wide up to its width; the body has a fixed height.
Edge cases (spec)

Queries with no results still offer Ask AI. Recent searches de-duplicate and keep five. Long result labels truncate.

Notes for AI

  • Import AiSearchBar from oxyn_dioxus and include PRIMITIVES_CSS plus the token stylesheet once.
  • A GPUI version exists: AiSearchBarEl in oxyn_gpui.
  • Props to set first: results, answer, now.
  • It reads a clock (now) for live timers; pass one clock for the whole page rather than one per component.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI