Skip to content
GitHub11 stars

Accordion

A vertically stacked set of interactive headings that each reveal a section of content.

We offer standard (5-7 days), express (2-3 days), and overnight shipping. Free shipping on international orders.

<Accordion Value="@(["shipping"])" Class="max-w-lg">
    <AccordionItem Value="shipping">
        <AccordionTrigger>What are your shipping options?</AccordionTrigger>

Installation

dnx Blazix.Cli add accordion

Usage

<Accordion Value="@(["item-1"])">
    <AccordionItem Value="item-1">
        <AccordionTrigger>Is it accessible?</AccordionTrigger>
        <AccordionContent>Yes. It adheres to the WAI-ARIA design pattern.</AccordionContent>
    </AccordionItem>
</Accordion>

Composition

Use the following composition to build an Accordion:

Accordion
├── AccordionItem
│   ├── AccordionTrigger
│   └── AccordionContent
└── AccordionItem
    ├── AccordionTrigger
    └── AccordionContent

Basic

A basic accordion that shows one item at a time. The first item is open by default.

Click on 'Forgot Password' on the login page, enter your email address, and we'll send you a link to reset your password. The link will expire in 24 hours.

<Accordion Value="@(["item-1"])" Class="max-w-lg">
    @foreach (var item in Items)
    {

Multiple

Use the Multiple parameter to allow multiple items to be open at the same time.

Manage how you receive notifications. You can enable email alerts for updates or push notifications for mobile devices.

<Accordion Multiple="true" Class="max-w-lg" Value="@(["notifications"])">
    @foreach (var item in Items)
    {

Disabled

Use the Disabled parameter on AccordionItem to disable individual items.

<Accordion Class="w-full">
    <AccordionItem Value="item-1">
        <AccordionTrigger>Can I access my account history?</AccordionTrigger>

Borders

Add border to the Accordion and border-b last:border-b-0 to the AccordionItem to add borders to the items.

We offer monthly and annual subscription plans. Billing is charged at the beginning of each cycle, and you can cancel anytime. All plans include automatic backups, 24/7 support, and unlimited team members.

<Accordion Class="max-w-lg rounded-lg border" Value="@(["billing"])">
    @foreach (var item in Items)
    {

Card

Wrap the Accordion in a Card component.

Subscription & Billing
Common questions about your account, plans, payments and cancellations.

We offer three subscription tiers: Starter ($9/month), Professional ($29/month), and Enterprise ($99/month). Each plan includes increasing storage limits, API access, priority support, and team collaboration features.

<Card Class="w-full max-w-sm">
    <CardHeader>
        <CardTitle>Subscription & Billing</CardTitle>

RTL

To enable RTL support in Blazix, see the RTL configuration guide.

Translated with AI for the demo, so it may have mistakes.

انقر على 'نسيت كلمة المرور' في صفحة تسجيل الدخول، أدخل عنوان بريدك الإلكتروني، وسنرسل لك رابطًا لإعادة تعيين كلمة المرور.

<Accordion Value="@(["item-1"])" Class="max-w-md">
    @foreach (var (value, question, answer) in T.Items)
    {

API Reference

Accordion

ParameterTypeDefault
Render RenderFragment<AccordionRenderProps>? -
Value IReadOnlyList<string>? -
ValueChanged EventCallback<IReadOnlyList<string>?> -
OnValueChange EventCallback<ValueChangeEventArgs<IReadOnlyList<string>>> -
Multiple bool false
Disabled bool false
Orientation Orientation Orientation.Vertical
LoopFocus bool true
KeepMounted bool false
HiddenUntilFound bool false
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

AccordionContent

ParameterTypeDefault
KeepMounted bool false
HiddenUntilFound bool? -
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

AccordionItem

ParameterTypeDefault
Render RenderFragment<AccordionItemRenderProps>? -
Value string? -
Disabled bool false
OnOpenChange EventCallback<OpenChangeEventArgs> -
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

AccordionTrigger

ParameterTypeDefault
Render RenderFragment<AccordionItemRenderProps>? -
NativeButton bool? -
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.