Diego Betto's Blog
Grid of WordPress Dashicons icons

Diego Betto · September 10, 2024 · 1 min di lettura

List of Dashicons names from the WordPress docs

Snippet to extract the list of Dashicons names from the WordPress documentation page

Condividi:XLinkedInFacebookWhatsApp

If you need a quick way to extract the list of Dashicons icon names from the WordPress documentation page, you can, from that same page, open the browser console and run the following code snippet.

After running it, the list of names will be copied to your clipboard.

copy(
  Array.from(document.querySelectorAll("li.dashicons")).reduce((acc, curr) => {
    const classList = new Set(curr.classList);
    classList.delete("dashicons");
    return [...acc, Array.from(classList)[0].toString().replace("dashicons-", "")];
  }, []),
);
Condividi:XLinkedInFacebookWhatsApp
Diego Betto

Written by

Diego Betto

Co-Founder & CTO at PAPION. Senior full-stack engineer specializing in React, TypeScript, Node.js, and application security.