AccordionItem

in namespace DotVVM.Bootstrap5.Controls

AccordionItem controls used in Accordion component.

Usage & Scenarios

Represents an item in Accordion control.

https://getbootstrap.com/docs/5.2/components/accordion/

Sample 1: Text

You can use HeaderText or HeaderTemplate, and ContentTextor ContentTemplate properties to specify contents of the card header and footer bar.

<bs:Accordion>
    <bs:AccordionItem HeaderText="Header" ContentText="Text"/>
    <bs:AccordionItem>
        <HeaderTemplate>
            HeaderTemplate
        </HeaderTemplate>
        <ContentTemplate>
            <bs:CardBody>
                Content
            </bs:CardBody>
        </ContentTemplate>
    </bs:AccordionItem>
</bs:Accordion>

Properties

Name Type Description Notes Default Value
property icon ContentTemplate ITemplate Gets or sets a custom template for accordion item content when DataSource is set.
attribute
inner element
static value
bindable
default
null
property icon ContentText String Gets or sets a plain text for accordion item content when DataSource is set.
attribute
inner element
static value
bindable
default
null
property icon HeaderTemplate ITemplate Gets or sets a custom template for accordion item header when DataSource is set.
attribute
inner element
static value
bindable
default
null
property icon HeaderText String Gets or sets a plain text for accordion item header when DataSource is set.
attribute
inner element
static value
bindable
default
null
property icon IsExpanded Boolean Gets or sets whether the item is expanded.
attribute
inner element
static value
bindable
default
False
property icon Visible Boolean Gets or sets whether the control is visible. When set to false, `style="display: none"` will be added to this control.
attribute
inner element
static value
bindable
default
True

HTML produced by the control