# Spotlight
A command palette — the Cmd+K overlay you see in editors and dashboards. It is a
searchable list of actions that floats over the page; you type to filter, arrow
through the matches, and press Enter to run one. It renders no visible chrome of its
own and starts closed, so it never covers the page on load. You open it imperatively
from JavaScript with `spotlight.open()` — wired here to a trigger button — or with its
registered keyboard shortcut.
Because the open call is imperative rather than a static prop, this page ships it as a
small self-contained snippet, `{% SpotlightDemo %}`, that renders
the palette plus a button whose click calls `spotlight.open()`.
## Demonstrations
Click the button to open the palette, then type to filter the actions, arrow to a
match, and press Enter (or click) to run it. Escape closes it.
Source: Markdown
```aardvark
{% SpotlightDemo %}
```
## The actions array and spotlight.open()
The palette is driven by an **actions array** — the searchable command list. Each entry
is an object with an `id`, a `label`, an optional `description`, and an `onClick`
handler that runs when the action is triggered:
```jsx
const actions = [
{ id: 'home', label: 'Home', description: 'Go to the home page',
onClick: () => { /* navigate, run a command, … */ } },
{ id: 'search', label: 'Search the site', keywords: ['find', 'lookup'],
onClick: () => { /* … */ } },
];
```
The default filter matches the query against each action's `label`, `description`, and
`keywords`. Triggering an action runs its `onClick` and closes the palette.
Opening is imperative: any code can call `spotlight.open()` (and `spotlight.close()` /
`spotlight.toggle()`). Here the trigger button does it on click:
```jsx
import { Spotlight, spotlight } from '@mantine/spotlight';
import { Button } from '@mantine/core';
<>