Back to Home

Accordion

Collapsible content sections with smooth animations

Basic Usage

The most basic accordion with multiple items:

Neura is a comprehensive multi-tenant SaaS starter kit built with Laravel and Livewire. It includes everything you need to launch your product quickly.

We offer three pricing tiers: Starter, Pro, and Enterprise. All plans include full source code access and updates. Choose the plan that fits your needs.

Yes! All plans include support. Starter gets 6 months, Pro gets 1 year, and Enterprise gets lifetime priority support.

<neura::accordion>
    <neura::accordion.item>
        <neura::accordion.trigger>
            Question title
        </neura::accordion.trigger>
        <neura::accordion.content>
            Answer content here
        </neura::accordion.content>
    </neura::accordion.item>
</neura::accordion>

Simplified Syntax

Use the trigger attribute for shorter syntax:
<p class="text-sm text-neutral-600 dark:text-neutral-400"> Neura is built with Laravel 12, Livewire 4, Tailwind CSS 4, and Alpine.js. All modern and production-ready technologies. </p>
<p class="text-sm text-neutral-600 dark:text-neutral-400"> Absolutely! The entire UI is built with Tailwind CSS utility classes, making it easy to customize colors, spacing, and styles. </p>
<neura::accordion.item trigger="Question title">
    Answer content here
</neura::accordion.item>

Expanded by Default

Open an item by default with the expanded attribute:
<p class="text-sm text-neutral-600 dark:text-neutral-400"> This section is expanded by default. Great for highlighting important information or ensuring users see key content immediately. </p>
<p class="text-sm text-neutral-600 dark:text-neutral-400"> This section starts collapsed and can be opened by clicking. </p>
<neura::accordion.item trigger="Title" expanded>
    Content visible by default
</neura::accordion.item>

Disabled Items

Disable items with the disabled attribute:
<div class="text-neutral-700 dark:text-neutral-300 [:where(&amp;)]:leading-relaxed text-base" data-slot="text" > This item is active and can be toggled. </div>
<div class="text-neutral-700 dark:text-neutral-300 [:where(&amp;)]:leading-relaxed text-base" data-slot="text" > This content cannot be accessed. </div>
<div class="text-neutral-700 dark:text-neutral-300 [:where(&amp;)]:leading-relaxed text-base" data-slot="text" > This item works normally. </div>
<neura::accordion.item trigger="Title" disabled>
    Content not accessible
</neura::accordion.item>

Styled Accordions

Customize the appearance with Tailwind classes:
  • Multi-tenant architecture
  • Stripe integration
  • Team management
We offer flexible pricing starting at $149. All plans include full source code and regular updates.
<neura::accordion class="border rounded-lg">
    <neura::accordion.item class="hover:bg-neutral-50">
        <neura::accordion.trigger class="bg-neutral-100">
            Title
        </neura::accordion.trigger>
        <neura::accordion.content>
            Content
        </neura::accordion.content>
    </neura::accordion.item>
</neura::accordion>

FAQ Example

Perfect for FAQ sections:
<div class="space-y-3"> <div class="text-neutral-700 dark:text-neutral-300 [:where(&amp;)]:leading-relaxed text-base" data-slot="text" > Getting started is easy! Follow these steps: </div> <ol class="list-decimal list-inside space-y-2 text-sm"> <li>Clone the repository</li> <li>Install dependencies with composer and npm</li> <li>Configure your environment</li> <li>Run migrations</li> <li>Start building!</li> </ol> </div>
<div class="text-neutral-700 dark:text-neutral-300 [:where(&amp;)]:leading-relaxed text-base" data-slot="text" > We accept all major credit cards (Visa, MasterCard, American Express) and PayPal. All payments are processed securely through Stripe. </div>
<div class="text-neutral-700 dark:text-neutral-300 [:where(&amp;)]:leading-relaxed text-base" data-slot="text" > Yes! We offer a 30-day money-back guarantee. If you're not satisfied with Neura for any reason, contact us for a full refund. </div>
<div class="text-neutral-700 dark:text-neutral-300 [:where(&amp;)]:leading-relaxed text-base" data-slot="text" > Absolutely! Support duration varies by plan: 6 months for Starter, 1 year for Pro, and lifetime priority support for Enterprise. </div>
<div class="text-neutral-700 dark:text-neutral-300 [:where(&amp;)]:leading-relaxed text-base" data-slot="text" > Yes! You can use Neura to build unlimited client projects. The license allows you to create as many projects as you need. </div>
<neura::accordion>
    <neura::accordion.item trigger="Question?" expanded>
        Answer here
    </neura::accordion.item>
    
    <neura::accordion.item trigger="Another question?">
        Another answer
    </neura::accordion.item>
</neura::accordion>

With Rich Content

Content can include any component:
<div class="space-y-3"> <div class="flex items-start gap-3"> <svg data-slot="icon" class="size-5 text-green-600 shrink-0 mt-0.5" stroke="currentColor" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M9 12.75L11.25 15L15 9.75M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg> <div> <div class="text-neutral-700 dark:text-neutral-300 [:where(&amp;)]:leading-relaxed text-base font-medium" data-slot="text" > Multi-Tenant Ready </div> <div class="text-neutral-700 dark:text-neutral-300 [:where(&amp;)]:leading-relaxed text-base" data-slot="text" > Built-in multi-tenancy with subdomain support </div> </div> </div> <div class="flex items-start gap-3"> <svg data-slot="icon" class="size-5 text-green-600 shrink-0 mt-0.5" stroke="currentColor" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M9 12.75L11.25 15L15 9.75M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg> <div> <div class="text-neutral-700 dark:text-neutral-300 [:where(&amp;)]:leading-relaxed text-base font-medium" data-slot="text" > Billing Integration </div> <div class="text-neutral-700 dark:text-neutral-300 [:where(&amp;)]:leading-relaxed text-base" data-slot="text" > Stripe integration with subscription management </div> </div> </div> </div>
<div class="block static w-auto p-4 border border-neutral-200 dark:border-neutral-800 rounded-lg gap-3 bg-neutral-900 dark:bg-black" data-slot="box"> <pre class="text-sm text-neutral-100"><code>Route::get('/dashboard', Dashboard::class) ->name('dashboard');</code></pre> </div>
<div class="flex gap-2"> <!--[if BLOCK]><![endif]--> <button type="button" class="relative inline-flex items-center font-medium justify-center gap-x-2 whitespace-nowrap transition-all duration-150 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none cursor-pointer rounded-lg [&amp;&gt;[data-loading=true]:first-child]:flex [&amp;&gt;[data-loading=true]:first-child~*]:opacity-0 [&amp;_[data-slot=left-icon]]:shrink-0 [&amp;_[data-slot=right-icon]]:shrink-0 px-3 py-1.5 h-8 text-sm bg-primary-900 text-white [&amp;_svg]:text-white dark:bg-primary-100 dark:text-primary-900 dark:[&amp;_svg]:text-primary-900 shadow-sm hover:bg-primary-800 dark:hover:bg-primary-200" data-slot="button" aria-busy="false" aria-disabled="false"> <div class="absolute inset-0 hidden items-center justify-center" > <svg class="shrink-0 [:where(&amp;)]:size-5 animate-spin size-4" data-slot="loading-indicator" data-flux-icon xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" aria-hidden="true" data-slot="icon"> <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle> <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path> </svg> </div> <!--[if BLOCK]><![endif]--><!--[if ENDBLOCK]><![endif]--> <!--[if BLOCK]><![endif]--> <span>Primary Action</span> <!--[if ENDBLOCK]><![endif]--> <!--[if BLOCK]><![endif]--><!--[if ENDBLOCK]><![endif]--> </button> <!--[if ENDBLOCK]><![endif]--> <!--[if BLOCK]><![endif]--> <button type="button" class="relative inline-flex items-center font-medium justify-center gap-x-2 whitespace-nowrap transition-all duration-150 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none cursor-pointer rounded-lg [&amp;&gt;[data-loading=true]:first-child]:flex [&amp;&gt;[data-loading=true]:first-child~*]:opacity-0 [&amp;_[data-slot=left-icon]]:shrink-0 [&amp;_[data-slot=right-icon]]:shrink-0 px-3 py-1.5 h-8 text-sm border border-primary-300 dark:border-primary-700 bg-white dark:bg-primary-950 text-primary-600 [&amp;_svg]:text-primary-600 dark:text-primary-400 dark:[&amp;_svg]:text-primary-400 shadow-sm hover:bg-primary-50 dark:hover:bg-primary-900/30" data-slot="button" aria-busy="false" aria-disabled="false"> <div class="absolute inset-0 hidden items-center justify-center" > <svg class="shrink-0 [:where(&amp;)]:size-5 animate-spin size-4" data-slot="loading-indicator" data-flux-icon xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" aria-hidden="true" data-slot="icon"> <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle> <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path> </svg> </div> <!--[if BLOCK]><![endif]--><!--[if ENDBLOCK]><![endif]--> <!--[if BLOCK]><![endif]--> <span>Secondary</span> <!--[if ENDBLOCK]><![endif]--> <!--[if BLOCK]><![endif]--><!--[if ENDBLOCK]><![endif]--> </button> <!--[if ENDBLOCK]><![endif]--> </div>
<neura::accordion.item trigger="Title">
    <div class="flex gap-2">
        <neura::button>Action</neura::button>
    </div>
</neura::accordion.item>

Colored Accordions

Add colors to differentiate sections:
<div class="block static w-auto p-4 gap-3 bg-blue-50 dark:bg-blue-950 border-blue-200 dark:border-blue-800" data-slot="box"> <div class="flex items-start gap-3"> <svg data-slot="icon" class="size-5 text-neutral-600 dark:text-neutral-400 shrink-0" stroke="currentColor" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M11.25 11.25L11.2915 11.2293C11.8646 10.9427 12.5099 11.4603 12.3545 12.082L11.6455 14.918C11.4901 15.5397 12.1354 16.0573 12.7085 15.7707L12.75 15.75M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12ZM12 8.25H12.0075V8.2575H12V8.25Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg> <div class="text-neutral-700 dark:text-neutral-300 [:where(&amp;)]:leading-relaxed text-base text-sm text-blue-700 dark:text-blue-300" data-slot="text" > This is an informational message with important details. </div> </div> </div>
<div class="block static w-auto p-4 gap-3 bg-green-50 dark:bg-green-950 border-green-200 dark:border-green-800" data-slot="box"> <div class="flex items-start gap-3"> <svg data-slot="icon" class="size-5 text-green-600 dark:text-green-400 shrink-0" stroke="currentColor" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M9 12.75L11.25 15L15 9.75M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg> <div class="text-neutral-700 dark:text-neutral-300 [:where(&amp;)]:leading-relaxed text-base text-sm text-green-700 dark:text-green-300" data-slot="text" > Operation completed successfully! </div> </div> </div>
<div class="block static w-auto p-4 gap-3 bg-yellow-50 dark:bg-yellow-950 border-yellow-200 dark:border-yellow-800" data-slot="box"> <div class="flex items-start gap-3"> <svg data-slot="icon" class="size-5 text-yellow-600 dark:text-yellow-400 shrink-0" stroke="currentColor" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M11.9998 9.00006V12.7501M2.69653 16.1257C1.83114 17.6257 2.91371 19.5001 4.64544 19.5001H19.3541C21.0858 19.5001 22.1684 17.6257 21.303 16.1257L13.9487 3.37819C13.0828 1.87736 10.9167 1.87736 10.0509 3.37819L2.69653 16.1257ZM11.9998 15.7501H12.0073V15.7576H11.9998V15.7501Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg> <div class="text-neutral-700 dark:text-neutral-300 [:where(&amp;)]:leading-relaxed text-base text-sm text-yellow-700 dark:text-yellow-300" data-slot="text" > Please review this information carefully. </div> </div> </div>
<neura::accordion class="border border-blue-200 rounded-lg">
    <neura::accordion.item trigger="Info">
        <neura::box class="bg-blue-50">
            Content
        </neura::box>
    </neura::accordion.item>
</neura::accordion>

Documentation Sections

Organize documentation into sections:
<div class="space-y-3"> <div class="text-neutral-700 dark:text-neutral-300 [:where(&amp;)]:leading-relaxed text-base" data-slot="text" > Install Neura with these commands: </div> <div class="block static w-auto p-4 border border-neutral-200 dark:border-neutral-800 rounded-lg gap-3 bg-neutral-900 dark:bg-black" data-slot="box"> <pre class="text-sm text-neutral-100"><code>composer install npm install php artisan migrate</code></pre> </div> </div>
<div class="text-neutral-700 dark:text-neutral-300 [:where(&amp;)]:leading-relaxed text-base" data-slot="text" > Update your .env file with database credentials and application settings. Make sure to set your APP_URL and database connection details. </div>
<div class="text-neutral-700 dark:text-neutral-300 [:where(&amp;)]:leading-relaxed text-base" data-slot="text" > Deploy to any server that supports Laravel. We recommend using Laravel Forge or Ploi for easy deployment and management. </div>

Best Practices

Use for optional content
Accordions are perfect for content that users can choose to view
Limit the number of items
Maximum 5-7 items for better user experience
Use clear titles
Triggers should be descriptive so users know what they'll find
Avoid critical content
Don't hide essential information in accordions
Expand important sections
Use expanded to open the most relevant sections by default

Properties

Property Type Default Description
trigger string null Trigger button text (shorthand syntax)
expanded boolean false Open by default
disabled boolean false Disable item interaction
reverse boolean false Reverse trigger layout