AccordionSectionWidget
Namespace: Hex1b.Widgets
Assembly: Hex1b.dll
Represents a single section within an Accordion. Contains the section title, content builder, and action icons.
public sealed record AccordionSectionWidget : Hex1bWidget, IEquatable<Hex1bWidget>, IEquatable<AccordionSectionWidget>Inheritance
Object → Hex1bWidget → AccordionSectionWidget
Implements
Constructors
AccordionSectionWidget(Func<WidgetContext<VStackWidget>, IEnumerable<Hex1bWidget>>)
Represents a single section within an Accordion. Contains the section title, content builder, and action icons.
Parameters:
ContentBuilder(Func<VStackWidget>, Hex1bWidget>>): A function that builds the section content widgets.
public AccordionSectionWidget(Func<WidgetContext<VStackWidget>, IEnumerable<Hex1bWidget>> ContentBuilder)Properties
ContentBuilder
A function that builds the section content widgets.
Returns: Func<VStackWidget>, Hex1bWidget>>
public Func<WidgetContext<VStackWidget>, IEnumerable<Hex1bWidget>> ContentBuilder { get; init; }IsExpanded
Whether this section is expanded. When not explicitly set, the accordion will expand the first section by default.
Returns: Nullable<Boolean>
public bool? IsExpanded { get; init; }SectionTitle
The title displayed in the section header.
Returns: String
public string SectionTitle { get; init; }Methods
Expanded(bool)
Sets the initial expanded state for this section. When not explicitly set, the accordion expands the first section by default.
Parameters:
expanded(Boolean): True to expand, false to collapse.
Returns: AccordionSectionWidget
public AccordionSectionWidget Expanded(bool expanded = true)LeftActions(Func<AccordionSectionActionBuilder, IEnumerable<AccordionSectionAction>>)
Adds actions to the left side of the section header. A default toggle chevron is prepended unless a toggle action is included.
Parameters:
builder(Func<AccordionSectionActionBuilder, AccordionSectionAction>>): A function that returns the actions to add.
Returns: AccordionSectionWidget
public AccordionSectionWidget LeftActions(Func<AccordionSectionActionBuilder, IEnumerable<AccordionSectionAction>> builder)RightActions(Func<AccordionSectionActionBuilder, IEnumerable<AccordionSectionAction>>)
Adds actions to the right side of the section header.
Parameters:
builder(Func<AccordionSectionActionBuilder, AccordionSectionAction>>): A function that returns the actions to add.
Returns: AccordionSectionWidget
public AccordionSectionWidget RightActions(Func<AccordionSectionActionBuilder, IEnumerable<AccordionSectionAction>> builder)Title(string)
Sets the title for this section.
Parameters:
title(String): The title displayed in the section header.
Returns: AccordionSectionWidget
public AccordionSectionWidget Title(string title)