Skip to main content
VelinStyle v0.8.0
⌂ Home
  1. Docs
  2. Components
  3. Command palette

Command palette

The <velin-command> component is a filterable command overlay (⌘K-style). Call open() / close() from your app shell. Added in 0.7.5.

Example

<button id="open-cmd">Open palette</button>
<velin-command id="cmd">
  <button type="button">Dashboard</button>
</velin-command>

JavaScript API

MethodDescription
open()Show the palette and focus the filter field
close()Dismiss the overlay

Import

Load the bundle once, then use the custom element in your markup:

<script type="module" src="../../dist/velinstyle-components.min.js"></script>
<velin-command>…</velin-command>

Theme wählen