Expander
Description
A single expand / collapse section, with a clickable header that reveals its body content. Used standalone for "show more" affordances, or grouped inside an Accordion.
Usage
API reference
public sealed class Expander : ComponentBase<Expander, HTMLElement>A single expand / collapse section, with a clickable header that reveals its body content.
Constructors
Properties
public bool IsExpanded { get ; set ; }Gets or sets whether the expander is expanded.
Methods
public Expander SetHeader(IComponent header)Sets the header of the component.
public Expander SetContent(IComponent content)Sets the content of the component.
public Expander OptionIcon(UIcons icon, string color = "", string background = "")Configures the option icon on the component.
public Expander ChevronRight()Configures the chevron right on the component.
public Expander OnToggle(Action<Expander> onToggle)Registers a callback invoked when the toggle event fires.
public Expander OnExpand(Action<Expander> onExpand)Registers a callback invoked when the expand event fires.
public Expander OnCollapse(Action<Expander> onCollapse)Registers a callback invoked when the collapse event fires.