Tesserae

OmniBox

Description

An omnibox search component

Omnibox provides a powerful input field for switching between a chat and a search interaction. For search, it also provides support for parsing and visual rendering of logical operators like AND, OR, NOT, parenthesis, and quotes.

API reference

class

OmniBox

public class OmniBox : IComponent, IHasBackgroundColor, ITabIndex

A heavyweight omni-search / autocomplete component with inline filter chips, multiple search modes (search/chat) and async value providers.

Constructors

Constructor
OmniBox
public OmniBox(Config config)

Initializes a new instance of this class.

Properties

Property
OmniBox.InlineFilterChips
public ObservableList<InlineFilterChip> InlineFilterChips { get; }

Gets or sets the inline filter chips.

Property
OmniBox.SelectedModel
public ModelOption SelectedModel

Gets or sets the selected model.

Property
OmniBox.SelectedThinkingEffort
public ThinkingEffort SelectedThinkingEffort

Gets or sets the selected thinking effort.

Property
OmniBox.IsModelLocked
public bool IsModelLocked

Returns a value indicating whether the component is model locked.

Property
OmniBox.IsGenerating
public bool IsGenerating { get ; set ; }

Returns a value indicating whether the component is generating.

Property
OmniBox.TabIndex
public int TabIndex { set ; }

Sets the keyboard tab order of the component.

Property
OmniBox.IsEnabled
public bool IsEnabled { get ; set ; }

Gets or sets a value indicating whether the component is interactive (enabled).

Property
OmniBox.SearchText
public string SearchText { get ; set ; }

Gets or sets the search text.

Property
OmniBox.ChatText
public string ChatText { get ; set ; }

Gets or sets the chat text.

Property
OmniBox.SearchPlaceholder
public string SearchPlaceholder { get ; set ; }

Gets or sets the search placeholder.

Property
OmniBox.ChatPlaceholder
public string ChatPlaceholder { get ; set ; }

Gets or sets the chat placeholder.

Property
OmniBox.Background
public string Background { get ; set ; }

Gets or sets the CSS background of the component.

Methods

Method
OmniBox.ParseQuery
public static SearchQuery ParseQuery(string input, bool tokenIgnoreCase = false)

Parses the query.

Method
OmniBox.RegisterSnap
public OmniBox RegisterSnap(SnapHandler snap)

Registers a snap-handler that can convert recognized input into an inline filter chip.

Method
OmniBox.RegisterSnaps
public OmniBox RegisterSnaps(params SnapHandler[] snaps)

Registers multiple snap-handlers in one call.

Method
OmniBox.RegisterFilterSnap
public OmniBox RegisterFilterSnap(FilterSnapHandler filter)

Registers a filter snap handler that creates an inline filter chip.

Method
OmniBox.RegisterFilterSnaps
public OmniBox RegisterFilterSnaps(params FilterSnapHandler[] filters)

Registers multiple filter snap handlers in one call.

Method
OmniBox.OnSearch
public OmniBox OnSearch(SearchEventHandler onSearch)

Registers a callback invoked when the search event fires.

Method
OmniBox.OnChat
public OmniBox OnChat(ChatEventHandler onChat)

Registers a callback invoked when the chat event fires.

Method
OmniBox.OnStop
public OmniBox OnStop(StopEventHandler onStop)

Registers a callback invoked when the stop event fires.

Method
OmniBox.OnModelChanged
public OmniBox OnModelChanged(ModelChangedEventHandler onModelChanged)

Registers a callback invoked when the model changed event fires.

Method
OmniBox.SetModels
public OmniBox SetModels(params ModelOption[] models)

Sets the models of the component.

Method
OmniBox.SetModels
public OmniBox SetModels(IEnumerable<ModelOption> models)

Sets the models of the component.

Method
OmniBox.LockModel
public OmniBox LockModel(ModelOption model)

Locks the OmniBox to the given model option so users cannot pick another.

Method
OmniBox.SetThinkingEffort
public OmniBox SetThinkingEffort(ThinkingEffort effort)

Sets the thinking effort of the component.

Method
OmniBox.OnInput
public OmniBox OnInput(ComponentEventHandler<OmniBox, Event> onInput)

Registers a callback invoked when the input event fires.

Method
OmniBox.OnKeyDown
public OmniBox OnKeyDown(ComponentEventHandler<OmniBox, KeyboardEvent> onKeyDown)

Registers a callback invoked when the key down event fires.

Method
OmniBox.OnKeyUp
public OmniBox OnKeyUp(ComponentEventHandler<OmniBox, KeyboardEvent> onKeyUp)

Registers a callback invoked when the key up event fires.

Method
OmniBox.OnKeyPress
public OmniBox OnKeyPress(ComponentEventHandler<OmniBox, KeyboardEvent> onKeyPress)

Registers a callback invoked when the key press event fires.

Method
OmniBox.OnFocus
public OmniBox OnFocus(ComponentEventHandler<OmniBox, Event> onFocus)

Registers a callback invoked when the focus event fires.

Method
OmniBox.OnBlur
public OmniBox OnBlur(ComponentEventHandler<OmniBox, Event> onBlur)

Registers a callback invoked when the blur event fires.

Method
OmniBox.WithHistory
public OmniBox WithHistory(Func<Task<SearchQuery[]>> historyFetcher)

Returns the component configured with the given history.

Method
OmniBox.Render
public HTMLElement Render()

Renders the component's root HTML element.

Method
OmniBox.SetKeyboardShortcut
public OmniBox SetKeyboardShortcut(params string[] keys)

Registers a global keyboard shortcut that focuses the OmniBox search input when pressed, and renders a visual chip showing the shortcut on the right side of the search box. In SearchAndChat mode, pressing the shortcut also switches the active mode to Search. Modifier names are case-insensitive ("Ctrl", "Cmd", "Meta", "Alt", "Shift"). Example: .

Method
OmniBox.SetSearchRightText
public OmniBox SetSearchRightText(string text)

Sets the search right text of the component.

Method
OmniBox.SetSearchText
public OmniBox SetSearchText(string text)

Sets the search text of the component.

Method
OmniBox.SetSearchPlaceholder
public OmniBox SetSearchPlaceholder(string text)

Sets the search placeholder of the component.

Method
OmniBox.SetChatText
public OmniBox SetChatText(string text)

Sets the chat text of the component.

Method
OmniBox.SetChatPlaceholder
public OmniBox SetChatPlaceholder(string text)

Sets the chat placeholder of the component.

Method
OmniBox.Disabled
public OmniBox Disabled(bool value = true)

Disables the component.

Method
OmniBox.Focus
public OmniBox Focus()

Moves keyboard focus to the component.

Method
OmniBox.Height
public OmniBox Height(UnitSize unitSize)

Gets or sets the CSS height of the component.

Method
OmniBox.H
public OmniBox H(int unitSize)

Shortcut for setting the height in pixels.

Events

Event
OmniBox.Stopped
public event StopEventHandler Stopped

Raised when stopped occurs.

Event
OmniBox.Input
public event ComponentEventHandler<OmniBox, Event> Input

Raised when input occurs.

Event
OmniBox.KeyDown
public event ComponentEventHandler<OmniBox, KeyboardEvent> KeyDown

Raised when key down occurs.

Event
OmniBox.KeyUp
public event ComponentEventHandler<OmniBox, KeyboardEvent> KeyUp

Raised when key up occurs.

Event
OmniBox.KeyPress
public event ComponentEventHandler<OmniBox, KeyboardEvent> KeyPress

Raised when key press occurs.

Event
OmniBox.ReceivedFocus
public event ComponentEventHandler<OmniBox, Event> ReceivedFocus

Raised when received focus occurs.

Event
OmniBox.LostFocus
public event ComponentEventHandler<OmniBox, Event> LostFocus

Raised when lost focus occurs.

Samples

Search (with FileDropArea)

Chat

Chat with locked model

Search & Chat

See also

© 2026 Tesserae. All rights reserved.