Opened 4 years ago

Closed 3 years ago

#4949 closed defect (bug) (fixed)

Add further Examples on Dashicons Page

Reported by: derweili's profile derweili Owned by: coffee2code's profile coffee2code
Milestone: Priority: low
Component: Developer Hub Keywords:


The Dashicons Documentation shows code examples for using Dashicons in a custom post type and in HTML/CSS.

Dashicons are also used for Blocks in Gutenberg Editor and Taxonomies.

Maybe we should also add examples for these use cases.

Change History (3)

#1 @desrosj
4 years ago

Thanks for this, @derweili! These examples should definitely be added to the bottom of the page.

Pinging @joen as this will be of interest to him as well.

#2 @Joen
4 years ago

Thanks for the ticket! Dashicons are not as widely used in the block editor any more, and the preferred syntax for block icons leverages the new icon syntax. This syntax:


This leverages the actual markup served in that constant, rather than being the name of an icon in a sprite. That also enables custom SVGs in an easier way.

I don't think the Dashicons component bundled with the block editor is deprecated, or will be any time soon. But it's a little bit a legacy way of doing it.

#3 @coffee2code
3 years ago

  • Owner set to coffee2code
  • Resolution set to fixed
  • Status changed from new to closed

In 11157:

Developer: Add examples for dashicons usage in block editor.

Props derweili, coffeed2code.
Fixes #4949.

Note: See TracTickets for help on using tickets.