Class BOBAccordionItem
- Namespace
- BlazOrbit.Components
- Assembly
- BlazOrbit.dll
[GenerateComponentInfo]
public class BOBAccordionItem : ComponentBase
- Inheritance
-
objectComponentBaseBOBAccordionItem
Constructors
BOBAccordionItem()
public BOBAccordionItem()
Properties
ChildContent
Body content rendered when the item is expanded.
[Parameter]
public RenderFragment? ChildContent { get; set; }
Property Value
- RenderFragment
Disabled
When true, the item is non-interactive and cannot be expanded or collapsed by the user.
[Parameter]
public bool Disabled { get; set; }
Property Value
- bool
ExpandIcon
Icon rendered next to the header. Defaults to BOBIconKeys.UI.Plus (rotates 45° to "x" when expanded).
If you set a directional icon (e.g. ChevronDown), override --_accordion-icon-rotation
in your CSS to a value that matches the glyph (180deg for chevrons).
[Parameter]
public IconKey? ExpandIcon { get; set; }
Property Value
ExpandIconColor
Color applied to the expand icon. Accepts any valid CSS color value, PaletteColor or BOBColor.
[Parameter]
public string? ExpandIconColor { get; set; }
Property Value
- string
Header
Markup rendered inside the header button. Required.
[Parameter]
[EditorRequired]
public RenderFragment? Header { get; set; }
Property Value
- RenderFragment
Id
Stable identifier for the item. Used to track expanded state. Required.
[Parameter]
[EditorRequired]
public string? Id { get; set; }
Property Value
- string
InitiallyExpanded
When true, the item starts expanded the first time it registers with its parent. Subsequent changes to this parameter are ignored — control expanded state through the parent's ExpandedItems binding.
[Parameter]
public bool InitiallyExpanded { get; set; }
Property Value
- bool
Parent
Parent BOBAccordion container that owns this item. Cascaded automatically.
[CascadingParameter]
public BOBAccordion? Parent { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builderRenderTreeBuilder
Dispose()
public void Dispose()
OnInitialized()
Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.
protected override void OnInitialized()