Invoker Commands - HTML command Demos | IconVault

Live demos of the HTML command and commandfor attributes: dialogs, popovers and media controls with zero JavaScript. Copy the HTML. Free.

All tools

Invoker Commands

Dialogs, popovers and media with zero JavaScript

5 of 5 free uses left
Browser note: your browser does not support the command attribute yet (Chrome 135+, Edge 135+). The code samples below still work where supported.

Live demo - Dialog show / close

A modal dialog opened and closed by buttons alone. Focus trapping and Esc come free.

Create account

This dialog opened with zero JavaScript.

Try Esc or clicking the backdrop - focus is trapped automatically.

HTML source

<button command="show-modal" commandfor="signup-dialog">Open signup</button>

<dialog id="signup-dialog" closedby="any">
  <h2>Create account</h2>
  <form method="dialog">
    <input type="email" placeholder="you@site.com" required>
    <button>Join</button>
  </form>
  <button command="close" commandfor="signup-dialog">Cancel</button>
</dialog>
Built-in commands: show-modal, close, show-popover, hide-popover, toggle-popover, play, pause, mute, unmute, toggle (details), request-close, and custom commands via commandevent listeners on any element.

5 of 5 free copies left.

About this tool

IconVault's Invoker Commands playground demonstrates the declarative command and commandfor attributes: buttons that open dialogs, toggle popovers, control media and flip details elements with zero JavaScript. Every demo on the page is wired the way the sample code shows, so what you click is literally what you copy.

Each of the four demos includes copyable HTML and a rundown of the built-in commands, from show-modal and toggle-popover to play, pause and mute. Everything is free and runs fully in your browser, with an honest note about which browsers support invokers today.

Frequently asked questions

Popular searches

invoker commandshtml command attributecommandforhtml invokersdeclarative htmlhtml without javascriptdialog show-modalhtml dialog elementdialog commandpopover apihtml popovertoggle popoverpopover without javascripthtml media commandscommand play pausedetails togglehtml details elementhtml command eventcommandeventcustom commands htmlchrome 135 featuresnew html featuresmodern htmldeclarative uihtml dialog tutorialhtml dialog examplemodal without javascriptpopover tutorialpopover example htmltooltip without javascriptdropdown without javascripthtml only componentslearn html dialogdialog closedbydialog backdroppopover positioninganchor positioning popoverhtml popover cssinvoker apiwhatwg invokersopenui invokershtml buttons no jsprogressive enhancement htmlaccessible modal htmlnative dialog vs div modalhtml dialog accessibilityjavascript free webvanilla html componentshtml command referencecommand attribute browser supportcan i use command attributehtml invoker commands listshow popover commandhide popover command

More tools

Coming soon

CLI

Coming soon

Figma plugin

Coming soon

VS Code extension

Coming soon

Chrome extension

Coming soon

AI icon generator

Coming soon

Team workspaces

Coming soon

View all 10+ tools →