Skip to main content

upp-search

A search bar component with a built-in clear button. It implements ControlValueAccessor so it can be used in both template-driven and reactive forms, or standalone with the Changed output.

When to Use

Use upp-search when you need a search/filter field. It provides a consistent search UI with automatic clear functionality and integrates with the platform's kiosk mode. For simple text entry without search semantics, prefer upp-input instead.

Demo

Source Code

<h2>Product Search</h2>
<p class="demo-description">Filter a product catalog in real time using <code>upp-search</code>.</p>

<div class="demo-section">
<upp-search
placeholder="Search products..."
[kiosk]="false"
(Changed)="onSearchChanged($event)">
</upp-search>

<p class="result-count">{{ filteredProducts.length }} of {{ products.length }} products</p>

<ion-list class="product-list">
<ion-item *ngFor="let product of filteredProducts" lines="full">
<ion-label>
<h3>{{ product.name }}</h3>
<p>{{ product.category }}</p>
</ion-label>
</ion-item>
<ion-item *ngIf="filteredProducts.length === 0" lines="none">
<ion-label color="medium">No products match your search.</ion-label>
</ion-item>
</ion-list>
</div>

API Reference

Inputs

PropertyTypeDefaultDescription
placeholderstring''Placeholder text shown inside the search bar.
colorstring'default'Color theme for the search bar.
disabledbooleanfalseDisables the search input.
kioskbooleantrueEnables kiosk mode (on-screen keyboard) when the platform reports kiosk.
valuestring | nullnullThe current search value (two-way via ControlValueAccessor).

Outputs

EventPayloadDescription
Changedstring | nullEmitted when the search value changes.