Using Superset’s internal icon set (or any other icon set) in custom HTML/CSS (table visualizations, dashboard templates)? #35275
Replies: 2 comments 5 replies
-
Superset’s internal icons are implemented as React components and are not exposed as a global icon font, CSS class, or SVG sprite, so you can’t reference them directly in custom HTML or CSS for Table chart columns or dashboard templates. If you want to use icons in custom Table columns (e.g., via SQL-generated HTML), you’ll need to use external icon libraries or your own hosted icon files. You can render HTML in Table chart cells (like CONCAT('<img src="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/svgs/solid/star.svg" width="16"/>') Or, if you load an icon font (like Font Awesome) via a CDN in your dashboard’s custom CSS, you can use: CONCAT('<i class="fa fa-star"></i>') Just make sure your custom CSS includes the relevant CDN link for the icon library, or host the icon files yourself and reference them in your HTML or CSS. There’s no built-in way to use Superset’s internal icons in this context, so using external libraries or your own assets is the recommended approach for visual consistency and flexibility [discussion]. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I'm customizing a Superset dashboard and was wondering:
Is it possible to reuse the icon package that Superset uses internally for its UI elements (e.g., icons in buttons, panels, etc.) in custom visualizations?
Specifically, I’d like to:
CONCAT
statement to build HTML.Benefits of being able to do something like this:
If Superset’s icon set isn't exposed or usable directly:
Would love any pointers, best practices, or examples if someone’s done something similar. @mistercrunch @rusackas @msyavuz
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions