# Aurora Accordion

> Accordion whose opened row detaches into its own card while an aurora gradient blooms behind the answer, then settles into a calm glow.

<demo-aurora-accordion>



</demo-aurora-accordion>

## Installation

```bash
npx shadcn-vue@latest add "https://nxui.geoql.in/r/aurora-accordion.json"
```

## Usage

```vue
<script setup lang="ts">
  import AuroraAccordion from '~/components/ui/aurora-accordion/AuroraAccordion.vue';

  const items = [
    {
      title: 'What does Blissful Studio do?',
      content: 'We are a design studio crafting brands and websites.',
      icon: 'lucide:sparkles',
    },
    {
      title: 'What services do you offer?',
      content: 'Brand identity, marketing sites, and product design.',
      icon: 'lucide:pen-tool',
    },
  ];
</script>

<template>
  <AuroraAccordion :items="items" />
</template>
```

Opening a row splits it out of the list into its own card (layout-animated
with springs), the `+` rotates into a `×`, and an aurora gradient blooms
behind the answer before settling to a soft glow. Colors work over both
light and dark backgrounds — pass your own `aurora-colors` to re-tint.

## Props

<table>
<thead>
  <tr>
    <th>
      Prop
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        items
      </code>
    </td>
    
    <td>
      <code>
        AuroraAccordionItem[]
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Rows (<code>
        title
      </code>
      
      , <code>
        content
      </code>
      
      , optional <code>
        icon
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        aurora-colors
      </code>
    </td>
    
    <td>
      <code>
        string[]
      </code>
    </td>
    
    <td>
      <code>
        ['#2563eb', '#9333ea', '#ea580c']
      </code>
    </td>
    
    <td>
      Aurora blend colors
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        bloom-duration
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        1400
      </code>
    </td>
    
    <td>
      Bloom flare duration in ms before settling
    </td>
  </tr>
</tbody>
</table>

## Events

<table>
<thead>
  <tr>
    <th>
      Event
    </th>
    
    <th>
      Payload
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        change
      </code>
    </td>
    
    <td>
      <code>
        number | null
      </code>
    </td>
    
    <td>
      Fired with the opened index (null when closed)
    </td>
  </tr>
</tbody>
</table>
