Custom Activity Icons
Add custom activity icons to Elsa Studio with a release-backed display settings provider.
How the icon path works
Add a provider
using System.Collections.Generic;
using Elsa.Studio.Workflows.UI.Contracts;
using Elsa.Studio.Workflows.UI.Models;
public sealed class AcmeActivityDisplaySettingsProvider
: IActivityDisplaySettingsProvider
{
private const string InvoiceIcon = """
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path fill="currentColor" d="M4 3h16v18H4z" />
<path fill="currentColor" d="M7 7h10v2H7zm0 4h10v2H7zm0 4h6v2H7z" />
</svg>
""";
public IDictionary<string, ActivityDisplaySettings> GetSettings() =>
new Dictionary<string, ActivityDisplaySettings>
{
["Acme.SendInvoice"] = new("#2563eb", InvoiceIcon)
};
}Register it in the Studio host
Dynamic activity sets
Provider precedence and fallback
Troubleshooting
The activity still has the default icon
The icon appears in one surface but not another
The activity is missing entirely
Related guides
Release source
Last updated