# CommandPaletteComponent

A search box that finds and runs commands from the keyboard.

```java
CommandPaletteComponent palette = new CommandPaletteComponent(bounds(), this)
        .group("World",
                Command.of("Teleport home", this::home).icon(Icon.GLOBE).shortcut("H").keywords("spawn", "bed"),
                Command.of("Save now", this::save).icon(Icon.DOWNLOAD).shortcut("Ctrl+S"))
        .group("Look", Command.of("Change theme", this::theme).icon(Icon.PALETTE))
        .recent(config.recentCommands)
        .onRun(c -> config.recentCommands = palette.recent());
add(palette); // last
// and from your own key handling, or a button:
palette.open();
```

## Variants

- Open
- Search: The letters that matched are marked.

Page: https://minuit.dryaides.com/components/commandpalette.html
