Skip to content

Search

Last updated 11 Nov 2026

NbSearch is the search field: a magnifying glass at the start, a clear button once there is a query, and Escape to clear it. It sits flush in a toolbar or a table header, and expandable folds it into a square button until it is wanted.

vue
<template>
  <NbSearch v-model="query" placeholder="Search invoices" />
</template>

When to use it ​

For a query that filters or finds: a table's rows, a list of members, a set of projects. A field that takes a value for a form (a name, an address) is an NbTextInput, even when it filters as you type.

Expandable ​

expandable starts the search as a square icon-only button the size of the field. A click, or Tab onto it, opens the field and moves focus into it. It folds back when focus leaves an empty field, and on Escape, which also clears it. It stays open while it holds a query, so a filter in force is never hidden behind a bare icon. Use it in a toolbar that is short of room, beside other icon-only buttons.

vue
<template>
  <NbSearch v-model="query" v-model:expanded="open" expandable />
</template>

Sizes ​

The four field sizes, the same heights as NbButton's: xs 24, sm 32, md 40, lg 48. Collapsed, an expandable search is a square of that height.