Skip to content
WingoUI
ComponentsTemplatesDocsPricingAI agentsBlogChangelogContact
Components
Buttons & Actions
ButtonButton GroupCopy ButtonDelete ButtonTheme ToggleToggleToggle Group
Inputs
Avatar UploadCalendarCheckboxColor PickerComboboxCountry SelectCron PickerCurrency InputDate PickerDate Range PickerDate Time PickerDuration PickerEmail InputEmoji PickerFile UploadFilter BuilderInputInput GroupListboxMasked InputMention InputMonth PickerMulti SelectNumber InputOTP InputPassword InputPhone InputRadio GroupRatingSearch InputSegmented ControlSelectSignature PadSliderSwitchTag InputTextareaTime PickerTimezone SelectTree Select
Forms
Address InputBooking WidgetCSV ImportFieldForm WizardInline EditInvoice line itemsRich Text EditorSchema Builder
Navigation
Back To TopBounce SidebarBreadcrumbCommand MenuGlobal SearchGooey NavHook SidebarNav MenuNav TabsPaginationProximity SidebarScroll ProgressSidebarStepsTable Of ContentsTabsTopbarUser MenuWorkspace Switcher
Overlays
Alert DialogContext MenuDialogDrawerDropdown MenuFamily DrawerHover CardPopoverShare DialogSheetShortcuts DialogTooltipTour
Feedback
AlertBannerCookie ConsentEmoji ReactionEmpty StateNotification BellNotification CenterProgressRoute ProgressSetup ChecklistSkeletonSpinnerToast
Data Display
Approval FlowAvatarBadgeCalendar ViewCode BlockComment ThreadContact cardCountdownDescription ListDiff ViewerFile ListFile managerFolderGanttJSON ViewerKbdLog ViewerMarkdownPresenceSchedulerTagTimelineTree View
Tables & Lists
Audit LogData TableDeal PipelineEditable GridKanbanListMembers tablePermissions MatrixTableTask ListVirtual List
Charts & Stats
Animated CounterArea chartBar chartDonut chartFunnel chartGaugeGitHub ActivityHeatmap calendarLeaderboardLine chartRadar chartRadial barSparklineStat CardTrackerTrend badge
Layout
AccordionApp ShellCardCollapsibleDetail LayoutEntity HeaderPage HeaderScroll AreaSeparatorSettings LayoutSplit ViewToolbar
Media
Audio PlayerCarouselCSV ViewerDOCX EditorDOCX ViewerExcel ViewerFile SystemImage compareImage CropperImage GalleryImage LightboxLocation MapPDF ViewerPowerPoint ViewerQR CodeStep PlayerVideo Player
AI Kit
Agent Status CardChat MessageChat ThreadChat WidgetConversation ListFluid OrbGrid RevealMatrix OrbModel PickerPrompt InputReasoning IndicatorRule BuilderSuggestion ChipsTool Call TimelineUsage MeterVoice InputWorkflow Canvas
Text & Effects
Background PatternGravity LettersMarqueeTerminalText AnimateText Rotate
Mobile
Action SheetBottom Tab BarFABHaptic ButtonHero HeaderInstall PromptLarge Title HeaderNotification BannerOnboarding CarouselPicker WheelPull To RefreshSlide To ConfirmSticky CTA BarSwipe DeckSwipeable Tabs
Commerce
Cart drawerCategory pickerCheckout stepsCoupon inputFavorite buttonFilter panelListing cardListing gridOrder trackerPricePrice rangePricing tableProduct galleryQuantity stepperReviewsSeller card
Marketing Sections
App Download SectionBlog Cards SectionCTA SectionFAQ SectionFeature GridFeature ShowcaseHero SectionIntegrations SectionLogo CloudMarketing FooterMarketing HeaderMarketing SectionNewsletter SectionPricing SectionStats SectionSteps SectionTeam SectionTestimonials SectionTimeline SectionVideo Section
Blocks
Admin Dashboard PageAdmin ShellAI Chat PageAPI Keys PageAutomation Builder PageCheckout PageCRM Contact PageCRM Pipeline PageError PagesInbox PageInvoice PageKPI DashboardListing Detail PageLogin PageMarketplace Home PageMarketplace Search PageMarketplace ShellMobile App HomeOnboarding FlowOrder History PagePost Listing WizardPricing PageProfile PageRegister PageSettings PageUsers Admin Page
Templates
About PageAcademy PageAccessibility PageAffiliate PageAgency PageAI Product PageAppointment Booking PageBlog PageBlog Post PageBug Bounty PageCareers PageChangelog PageCommunity PageCompare PageContact PageCustomer Story PageCustomers PageDemo Booking PageDevelopers PageDocs Home PageDownload PageEnterprise PageEvents PageExperts PageFAQ PageFeature PageGlossary PageHelp Article PageHelp Center PageHome Services PageImpact PageIntegration Detail PageIntegrations PageJob Detail PageLanding PageLaunch PageLegal PageManifesto PagePortfolio PagePress PageProduct Tour PagePromo PageReal Estate PageReferral PageResearch Report PageRestaurant PageRoadmap PageROI Calculator PageSecurity PageSolutions PageStartups PageStatus PageStorefront PageSwitch PageTemplate Gallery PageTravel PageWaitlist PageYear in Review Page
Hooks & Utilities
AI ChatChart kitCommerceDate utilsFile exportFile typesFiltersForm validationHapticsInvoicingMotion presetsNavigationNumber formatRelative timeRomanian locationsSpreadsheetText matchTonesUIProvideruseClipboarduseConsentuseControllableStateuseCooldownuseDebounceuseKeyboardInsetuseLocaleuseLongPressuseMediaControlsuseMediaQueryuseOverflowItemsusePersistedStateuseScrollEdgesuseScrollStateuseSelectionuseShortcutuseStickToBottom
GalleryTheme

Layout

Accordion

Layout

Accordion React component for Tailwind CSS v4

Trend badgeApp Shell
Live props
Behavior
type
collapsible
keepMounted
headingLevel
Appearance
variant
size
radius
indicator
indicatorPosition
tone
color
divided
State
disabled
Code
import { Accordion } from "@/components/ui/accordion"

<Accordion />
  1. Home
  2. Components
  3. Layout
  4. Accordion
Free

Accordion React component for Tailwind CSS v4

v1.0.0·Added in 1.0.0

A React accordion component for FAQs, settings sections and order details, with four variants, icons, descriptions and one or many open.

Click or tap anywhere on a row to open it: the answer grows out on a smooth spring while the rows below slide down, and the chevron flips (or the plus folds into a minus). In single mode opening one row closes the other. With a keyboard, Tab reaches the rows, Up and Down move between them, Home and End jump to the first and last, and Enter or Space toggles. Rows are at least 44px tall on every size and the whole row is the target, so they are easy to hit on a phone. With keepMounted, the browser's find in page opens the row that holds the match. With reduced motion nothing slides: the answer simply fades in and out.

Accordion is a free React component in the React layout components category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add accordion, together with useControllableState, Motion presets, Tones and UIProvider and the npm packages @radix-ui/react-accordion, lucide-react and motion.

Add to a project

Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup

npx wingo-ui@latest add accordion

Usage

Import Accordion from @/components/ui/accordion.

import { Accordion, type AccordionItemData } from "@/components/ui/accordion"

const faq: AccordionItemData[] = [
  {
    value: "posting",
    title: "How do I post a listing?",
    content: "Tap Post a listing, pick a category and upload your photos. The listing goes live within minutes.",
  },
  {
    value: "promotion",
    title: "How much does promotion cost?",
    content: "Promotion starts at $9.00 for 7 days, and the listing moves to the top results.",
  },
  {
    value: "returns",
    title: "Can I return an item?",
    content: "Yes, you have 14 days from delivery to return an item bought with delivery through the platform.",
  },
]

export function Faq() {
  return <Accordion items={faq} defaultValue="promotion" variant="separated" />
}

Props

  • items*
    AccordionItemData[]

    The rows: { value, title, description?, icon?, extra?, content, disabled? }. value must be unique (a duplicate replaces the earlier row); extra is a short value before the indicator, like a price or a count. An empty list renders nothing.

  • typedefault "single"
    "single" | "multiple"

    single keeps one row open at a time (value is a string); multiple lets any number stay open (value is a string[]).

  • collapsibledefault true
    boolean

    single type only: the open row closes again when clicked. Turn it off for sections where one must always stay open.

  • keepMounteddefault false
    boolean

    Keeps closed answers in the DOM (collapsed, hidden until found), so form fields keep their values, search engines read every answer and the browser's find in page opens the row that holds the match.

  • headingLeveldefault 3
    2 | 3 | 4 | 5 | 6

    The heading level that wraps each row, so the accordion fits the page outline for screen readers.

  • variantdefault "ghost"
    "ghost" | "outline" | "soft" | "separated"

    ghost is flush with hairlines between rows, outline and soft wrap the rows in one container, separated turns every row into its own raised card.

  • sizedefault "md"
    "sm" | "md" | "lg"

    Row height 44 / 56 / 64px with title 14 / 15 / 16px and content 13 / 14 / 15px. Even sm stays a full 44px touch target.

  • radiusdefault "md"
    "none" | "sm" | "md" | "lg" | "full"

    Corners of the outline and soft containers and of separated cards: 12 / 16 / 24px. On ghost rows it shapes the focus ring.

  • indicatordefault "chevron"
    "chevron" | "plus" | "none"

    The open / closed mark. The chevron turns, the plus folds into a minus; none hides it.

  • indicatorPositiondefault "end"
    "start" | "end"

    end puts the mark after the title. start puts it first, as a chevron that points at the title and turns down like a disclosure triangle; the content indents to the title.

  • tonedefault "neutral"
    "neutral" | "brand" | "success" | "warning" | "danger" | "info"

    Tints the open row's icon tile and indicator.

  • colordefault ""
    string

    Any CSS color for the open row's tint, mixed for contrast in both themes. Leave empty to use the tone.

  • divideddefault true
    boolean

    Hairlines between rows. soft insets them to the row padding like a grouped list; separated cards ignore it.

  • disableddefault false
    boolean

    Disables every row. Disable a single row with disabled on its item.

  • value
    string | string[]

    The open row (single) or rows (multiple), to control the accordion from outside.

  • defaultValue
    string | string[]

    The open row or rows on first render. Nothing is open by default ("" or []).

  • onValueChange
    (value: string | string[]) => void

    Called with the new value: a string for single ("" when the row closes), a string[] for multiple.

  • classNames
    Partial<Record<"item" | "trigger" | "icon" | "title" | "description" | "extra" | "indicator" | "content", string>>

    Extra classes for the inner parts of every row. content styles the padded inner box, not the animated wrapper.

  • className
    string

    Extra classes for the root, merged last.

Parts

  • AccordionRoot

    component

    The parts API, for rows that need custom markup. Takes every prop above except items and shares variant, size, indicator and tone with its parts. Props: AccordionRootProps.

  • AccordionItem

    component

    One row. Its value is what the root's value speaks. Props: { value: string; disabled?: boolean }.

  • AccordionTrigger

    component

    The clickable row inside its heading. children is the title; extra is a short value before the indicator. Props: { icon?: ReactNode; description?: ReactNode; extra?: ReactNode; children: ReactNode }.

  • AccordionContent

    component

    The answer. className and props go to the padded inner box; keepMounted overrides the root's for this row. Props: ComponentProps<"div"> & { keepMounted?: boolean }.

  • AccordionItemData

    type

    One entry of items: { value, title, description?, icon?, extra?, content, disabled? }.

Examples

Variants

Flush ghost rows, one outline or soft container, or a card per row.

Settings sections

type="multiple" with icons and descriptions; the open rows' tiles take the tone.

Plus at the start

The plus folds into a minus and the answer indents to the title. Brand tone, soft container.

Disabled row

A row that is coming soon: dimmed, skipped by the arrow keys, not clickable.

Controlled

value and onValueChange drive Open all / Close all from outside.

Order history

Separated cards built from the parts, with the total as an extra value in dollars.

Sizes

44, 56 and 64px rows; even sm keeps a full touch target.

Keep mounted, custom color

keepMounted keeps closed content in the DOM, so a half-filled field survives. Tinted with color.

Dependencies

@radix-ui/react-accordionlucide-reactmotionuse-controllable-statemotiontonesui-config

Files

  • components/ui/accordion.tsx

FAQ

Is the React Accordion component free?

Yes. The source is free and needs no account: copy it from the Code tab or install it with the CLI.

How do I install Accordion?

Run npx wingo-ui@latest add accordion. It also adds the Wingo UI items it builds on (useControllableState, Motion presets, Tones and UIProvider) and the npm packages @radix-ui/react-accordion, lucide-react and motion. With shadcn, run npx shadcn@latest add https://wingo-ui.com/r/accordion.json.

How does Accordion behave on phones?

Rows are at least 44px tall on every size and the whole row is the target, so they are easy to hit on a phone.

See also

CollapsibleTabsFAQ SectionuseControllableStatehookMotion presetslib

Used in

Nav MenuFilter panelPermissions MatrixFAQ SectionPricing PageAcademy PageIntegration Detail PagePromo PageWaitlist Page

More React layout components

Detail LayoutEntity HeaderPage HeaderScroll AreaSettings LayoutSplit View
All 12 React layout components

Articles using this component

  • shadcn Tailwind v4 Migration: Step by Step From v3

    Next.js and Tailwind CSS · Nov 6, 2026 · 10 min read

PreviousTrend badgeNext App Shell
Help center

Frequently asked questions

Short answers about listings, delivery and your account.

Promotion starts at $9.00 for 7 days. The listing moves to the top results of its category and gets the Promoted tag. Pay by card or from your account balance.

Did not find your answer? Write to us