Custom Cards
Learn how to configure custom cards in Umbraco UI Builder.
Defining a Custom Card
// Example
public class AvgPersonAgeCard : Card
{
public override string Alias => "avgPersonAge";
public override string Name => "Average Age";
public override string Icon => "icon-calendar";
public override string Color => "green";
public override string Suffix => "yrs";
public override object GetValue(object parentId = null)
{
// Perform value calculation logic
}
}Configuration Options
Option
Description
Required
Adding a Custom Card to a Collection
Using the AddCard() Method
AddCard() MethodMethod Syntax
Example
Using the AddCard(Type cardType) Method
AddCard(Type cardType) MethodMethod Syntax
Example
Last updated
Was this helpful?