macOS Spotlight-style command palette with multi-step commands and scoped search. Press Ctrl+K or ⌘K to open — it's mounted once in the layout, so the shortcut and the navbar/sidebar search triggers work on every page.
Inicio rápido
Open the command palette and try the different modes:
Estilo de visualización:
Modos
| Prefijo | Modo | Descripción |
|---|---|---|
/
| Commands | Multi-step action wizards |
:
| Search | Scoped entity search |
(none)
| Global | Search everything |
Comandos (/)
Type / to see available commands:
| Atajo | Nombre | Pasos |
|---|---|---|
/deploy
| Desplegar a entorno | 2 steps |
/assign
| Asignar a usuario | 2 steps |
/go
| Ir a la página | 1 steps |
/theme
| Cambiar tema | 1 steps |
Pruébalo
Buscar contextos (:)
Type : to see search contexts:
| Atajo | Contexto |
|---|---|
:products
| Productos |
:orders
| Pedidos |
:users
| Usuarios |
:invoices
| Facturas |
Pruébalo
Búsqueda global
Just type without a prefix to search everything:
Ampliarlo
The palette ships as a reusable LiveComponent. Mount it once in your layout and
point it at a PureAdmin.CommandPalette.Source module that supplies
your app's commands, contexts, search and actions:
<.live_component
module={PureAdmin.CommandPalette}
id="command-palette"
source={MyApp.Palette} />
defmodule MyApp.Palette do
use PureAdmin.CommandPalette.Source
def commands, do: [%{id: "go", shortcut: "/go", ...}]
def contexts, do: [%{id: "products", shortcut: ":p", ...}]
def step_options("go", "page", q, _sel), do: search_pages(q)
def search(:global, q), do: search_all(q)
def on_select(item), do: {:navigate, item.href}
def on_complete("go", sels), do: {:navigate, List.last(sels).value}
end
Atajos de teclado
| Clave | Acción |
|---|---|
| Ctrl+K / ⌘K | Toggle command palette |
| ↑ ↓ | Navigate results |
| ← → | Previous / next page (search modes) |
| Enter / Tab | Select item or confirm free text |
| Backspace (at start) | Go back to previous step |
| Esc | Back (in step/context) or close |