arya-blue
luna-amber
luna-blue
luna-green
luna-pink
nova-dark
nova-light
saga-blue
vela-blue
CommandPalette
Trigger the CommandPalette via a keyboard shortcut using <p:hotkey>. The palette also remains available via right-click on the target element.
Press Ctrl+Shift+K to open the CommandPalette via keyboard shortcut.
Right-click or press Ctrl+Shift+K to open the CommandPalette
File
New File
Open File
Save
Save As...
Edit
Undo
Redo
Cut
Copy
Paste
View
Zoom In
Zoom Out
Fullscreen
Source

                <h:panelGroup layout="block" style="margin-bottom:12px; font-size:14px; color:#555;">
        Press <kbd>Ctrl+Shift+K</kbd> to open the CommandPalette via keyboard shortcut.
    </h:panelGroup>

    <h:panelGroup id="hotkeyTarget" layout="block"
                  style="border:2px solid #c8c8c8; border-radius:3px; padding:40px; text-align:center;
                         background:#f9f9f9; font-size:14px; color:#555; user-select:none;">
        Right-click or press <kbd>Ctrl+Shift+K</kbd> to open the CommandPalette
    </h:panelGroup>

    <p:hotkey bind="ctrl+shift+k" handler="PF('hotkeyPaletteWidget').showCentered();" />

    <pe:commandPalette id="hotkeyPalette" for="hotkeyTarget"
                        label="Actions" filterPlaceholder="Search actions..." width="260" height="350"
                        widgetVar="hotkeyPaletteWidget">
        <pe:commandPaletteItem group="File" value="new" label="New File"/>
        <pe:commandPaletteItem group="File" value="open" label="Open File"/>
        <pe:commandPaletteItem group="File" value="save" label="Save"/>
        <pe:commandPaletteItem group="File" value="saveAs" label="Save As..."/>
        <pe:commandPaletteItem group="Edit" value="undo" label="Undo"/>
        <pe:commandPaletteItem group="Edit" value="redo" label="Redo"/>
        <pe:commandPaletteItem group="Edit" value="cut" label="Cut"/>
        <pe:commandPaletteItem group="Edit" value="copy" label="Copy"/>
        <pe:commandPaletteItem group="Edit" value="paste" label="Paste"/>
        <pe:commandPaletteItem group="View" value="zoomIn" label="Zoom In"/>
        <pe:commandPaletteItem group="View" value="zoomOut" label="Zoom Out"/>
        <pe:commandPaletteItem group="View" value="fullscreen" label="Fullscreen"/>
        <p:ajax event="select" listener="#{commandPaletteController.onItemSelect}"
                update="messages"/>
    </pe:commandPalette>
            
Components and more
Documentation pe:commandPalette
Attributes (move mouse over the names to see data types)
Name Description
bindingAn EL expression referring to a server side UIComponent instance in a backing bean.Default is generated.
filterPlaceholderPlaceholder text for the search/filter input.Default is Search....
forID of the target component that triggers the command palette on right-click.
heightMaximum height of the palette in pixels or a CSS value.Default is 400.
idUnique identifier of the component in a namingContainer.Default is generated.
labelHeader label text displayed at the top of the palette.
onSelectClient-side callback to execute when an item is selected. Signature: function(option).
renderedBoolean value to specify the rendering of the component, when set to false component will not be rendered.Default is true.
showFilterWhether to show the filter/search input.Default is true.
showHeaderWhether to show the header section.Default is true.
styleInline style of the component.
styleClassStyle class of the component.
triggerEventEvent type that triggers the palette. Default is contextmenu (right-click).Default is contextmenu.
widgetVarName of the client side widget.Default is generated ('widget_' + componentClientId).
widthWidth of the palette in pixels or a CSS value.Default is 280.
PrimeFaces Extensions Showcase - © 2011-2025,PrimeFaces: 16.0.0-SNAPSHOT,PrimeFaces Extensions: 16.0.0-SNAPSHOT,JSF: Apache MyFaces Core 4.0 - Impl 4.0.3,Server: Apache Tomcat (TomEE)/10.1.52 (10.1.4),Build time: 2026-06-18 11:35