SVG icons#
Module: ansys.solutions.dash_super_components.utils.svg_icons
For an overview of icon options and usage guidance, see the Icons page in the User Guide.
Provide offline SVG icons with customizable color parameters.
This module provides utilities for working with SVG icons bundled with the
library. You can look up available icon names using the IconNames enum
and encode SVG icons as Base64 data URIs for use in Dash components.
- class ansys.solutions.dash_super_components.utils.svg_icons.IconNames(*values)#
Bases:
EnumConstants for SVG icon names.
- ansys.solutions.dash_super_components.utils.svg_icons.create_base64_svg_src(icon_name: IconNames, color: str = '#000')#
Create a base64-encoded SVG data URI for the given icon and color.
- ansys.solutions.dash_super_components.utils.svg_icons.create_icon_span(icon_name: IconNames, size_px: int, color: str | None = None) Span#
Return a span element rendering a built-in library icon.
Looks up the icon by name from the bundled
IconNamescatalog and renders it as a CSS mask over a base64-encoded SVG. This keeps the component offline-compatible while allowing the icon color to either inheritcurrentColorfrom surrounding text or use an explicit override.
- ansys.solutions.dash_super_components.utils.svg_icons.create_image_icon_span(mask_image: str, size_px: int, *, color: str | None = None, class_name: str | None = None) Span#
Return a span element rendering an arbitrary image source as an icon.
Accepts any asset path or base64-encoded data URI and renders it using a CSS mask, making the icon color controllable via
coloror inherited fromcurrentColor.- Parameters:
- Returns:
html.SpanA Dash HTML span element containing the icon.
- ansys.solutions.dash_super_components.utils.svg_icons.get_svg_icon(icon_name: IconNames, color: str = '#000') str#
Return inline SVG content for icons with specified color.
Available icons#
The following icons are available in the IconNames enumeration. Each card
shows the rendered icon (in dark grey), the Python constant name
(IconNames.<NAME>), along with the corresponding icon-set identifier string
that is passed to the icon-set stylesheet.
| Icon | Enum name | Icon identifier |
|---|---|---|
AKAR_CIRCLE_CHECK |
akar-icons--circle-check |
|
CARBON_IBM_WORKFLOW |
carbon--ibm-engineering-workflow-mgmt |
|
CARBON_RETURN |
carbon--return |
|
EOS_CRITICAL_BUG |
eos-icons--critical-bug-outlined |
|
EOS_LOADING |
eos-icons--loading |
|
EOS_MONITORING |
eos-icons--monitoring |
|
FLUENT_DATA_SUNBURST |
fluent--data-sunburst-24-filled |
|
GAME_CROSSED_AIR_FLOWS |
game-icons--crossed-air-flows |
|
GAME_RADAR_SWEEP |
game-icons--radar-sweep |
|
HEALTH_NO |
healthicons--no |
|
HEALTH_YES |
healthicons--yes |
|
HERO_ADJUSTMENTS |
hero-outline--adjustments |
|
HERO_DATABASE |
hero-outline--database |
|
HUGE_FILE_SEARCH |
hugeicons--file-search |
|
HUGE_ROCKET |
hugeicons--rocket |
|
ICON_PARK_ERROR |
icon-park-solid--error |
|
ICON_PARK_OUTLINE_SUCCESS |
icon-park-outline--success |
|
ICON_PARK_PERMISSIONS |
icon-park-outline--permissions |
|
IC_EMAIL |
ic--baseline-email |
|
IC_ROUND_CELEBRATION |
ic--round-celebration |
|
MATERIAL_ADD |
material-symbols--add |
|
MATERIAL_DATABASE |
material-symbols--database |
|
MATERIAL_DELETE |
material-symbols--delete |
|
MATERIAL_DOWNLOAD |
material-symbols--download |
|
MATERIAL_ERROR |
material-symbols--error |
|
MATERIAL_FOLDER |
material-symbols--folder |
|
MATERIAL_HELP |
material-symbols--help |
|
MATERIAL_HOME |
material-symbols--home |
|
MATERIAL_INFO |
material-symbols--info |
|
MATERIAL_LIST |
material-symbols--list |
|
MATERIAL_REMOVE |
material-symbols--remove |
|
MATERIAL_TREE |
material-symbols--tree |
|
MATERIAL_UI_TABLE_ROWS |
materialui--table-rows |
|
MATERIAL_WARNING |
material-symbols--warning |
|
MDI_FILE_TREE |
mdi--file-tree |
|
MDI_FOLDER_SEARCH |
mdi--folder-search |
|
MDI_FORM_OUTLINE |
mdi--form-outline |
|
MDI_HIDE |
mdi--hide |
|
MDI_ROCKET |
mdi--rocket |
|
MDI_SECURE |
mdi--secure |
|
MDI_SHOW |
mdi--show |
|
MDI_SLIDER |
mdi--slider |
|
MDI_TABLE_EYE |
mdi--table-eye |
|
MDI_USER |
mdi--user |
|
OCTICONS_THREE_BARS |
octicons--three-bars-bold |
|
PEPICONS_INTERNET |
pepicons-pencil--internet |
|
PH_CODE_FILL |
ph--code-fill |
|
RADIX_MOON |
radix-icons--moon |
|
RADIX_SUN |
radix-icons--sun |
|
SIMPLE_OPSLEVEL |
simple-icons--opslevel |
|
SI_ERROR_DUOTONE |
si--error-duotone |
|
STREAMLINE_SHARP_STARTUP |
streamline-sharp--startup-solid |
|
STREAMLINE_STARTUP |
streamline--startup-solid |
|
TEENYICONS_DOC_SOLID |
teenyicons--doc-solid |