# Components Accordion: Highlight Active Accordion

An accordion that tints the background of the open item. The highlighted row keeps your place in long FAQ lists and dense product documentation.

- Page: https://www.shadcn-ui-blocks.com/blocks/components/accordions/highlight-active-accordion
- Collection: [Components](https://www.shadcn-ui-blocks.com/blocks/components), Free tier
- Group: [Accordions](https://www.shadcn-ui-blocks.com/blocks/components/accordions)
- Created: 2026-06-14
- Preview image: https://www.shadcn-ui-blocks.com/blocks/components/accordions/highlight-active-accordion.png

## Install

```bash
npx shadcn@latest add @shadcn-ui-blocks/components-accordions-highlight-active-accordion
```

A free block: it installs with no account or key. Or install it by URL: `npx shadcn@latest add "https://www.shadcn-ui-blocks.com/r/components-accordions-highlight-active-accordion.json"`.

## Depends on

- npm packages: lucide-react, radix-ui
- shadcn/ui components: accordion
- Installs to: `@/components/blocks/components/accordions/highlight-active-accordion`

## About this block

Highlight Active Accordion is a single-open accordion list. Each item sits
in a lightly rounded row with a bottom border. When a row opens, its
background shifts to a subtle tint so the active panel stands out from the
rest of the stack. The question text also gains weight and a short underline
animates in beneath it, giving two simultaneous cues that confirm the open
state. The answer appears in the padded content area below.

All three items are independent. You can add or remove rows freely, and the
question and answer copy in each item can be replaced with your own content
without touching the layout or the highlight behavior.

## When to use

Reach for this block when readers need to scan a list and track which item
they are currently reading. On a project management workspace, for instance,
a help or onboarding section often has a dozen questions and users scroll
back to find the one they opened. The tinted row stays visible even after
scrolling so there is no confusion about which answer is in view. It works
better than a plain divider accordion when the list is long enough that
keeping your place matters.

A natural flow around it on a Components page:

**Before**

- A [Tabs](https://www.shadcn-ui-blocks.com/blocks/components/tabs) group to let users filter topics before
  they read the detail underneath
- A [Cards](https://www.shadcn-ui-blocks.com/blocks/components/cards) block to introduce the section with a
  summary before the accordion expands the detail

**After**

- A [Badges](https://www.shadcn-ui-blocks.com/blocks/components/badges) row to tag related topics or link
  to further reading
- A [Minimal Line Accordion](https://www.shadcn-ui-blocks.com/blocks/components/accordions/minimal-line-accordion)
  if a quieter follow-on list is needed lower on the page

## What you can customize

Each item in the list is fully editable. Swap in your own questions and
answers, adjust the number of rows, and the highlight and underline
transitions carry through automatically.

- **Active row tint.** The open item receives a muted background wash so
  readers always know which answer is in view without a heavy color change.
- **Underline on the trigger.** A short line scales in beneath the question
  text when the panel opens, adding a second quiet signal alongside the
  background shift.
- **Single open at a time.** Only one panel can be open, which keeps the
  list compact and prevents multiple highlighted rows from competing.

> Tip: keep question text short enough to fit one line in the trigger row
> so the underline animation reads cleanly without wrapping.

## More in Components Accordions

- [Border Fade Accordion](https://www.shadcn-ui-blocks.com/blocks/components/accordions/border-fade-accordion)
- [Card Accordion](https://www.shadcn-ui-blocks.com/blocks/components/accordions/card-accordion)
- [Dash Line Accordion](https://www.shadcn-ui-blocks.com/blocks/components/accordions/dash-line-accordion)
- [Dotted Border Accordion](https://www.shadcn-ui-blocks.com/blocks/components/accordions/dotted-border-accordion)
- [Double Border Accordion](https://www.shadcn-ui-blocks.com/blocks/components/accordions/double-border-accordion)
- [Fade In Content Accordion](https://www.shadcn-ui-blocks.com/blocks/components/accordions/fade-in-content-accordion)
- [Floating Label Accordion](https://www.shadcn-ui-blocks.com/blocks/components/accordions/floating-label-accordion)
- [Glow Border Accordion](https://www.shadcn-ui-blocks.com/blocks/components/accordions/glow-border-accordion)
- [Minimal Line Accordion](https://www.shadcn-ui-blocks.com/blocks/components/accordions/minimal-line-accordion)
- [Nested Border Accordion](https://www.shadcn-ui-blocks.com/blocks/components/accordions/nested-border-accordion)
- [Numbered Accordion](https://www.shadcn-ui-blocks.com/blocks/components/accordions/numbered-accordion)
- [Shadow Reveal Accordion](https://www.shadcn-ui-blocks.com/blocks/components/accordions/shadow-reveal-accordion)
- [Stepped Accordion](https://www.shadcn-ui-blocks.com/blocks/components/accordions/stepped-accordion)
- [Thick Side Border Accordion](https://www.shadcn-ui-blocks.com/blocks/components/accordions/thick-side-border-accordion)
- [Underline Accordion](https://www.shadcn-ui-blocks.com/blocks/components/accordions/underline-accordion)
