BuouNext
  • Features
  • DocumentsNew
  • BrutalUINew
  • ShowcaseHot
  • Pricing
  • Blog

Documentation

PreviewNewInstallationNew

Components

AccordionNewAlertNewAlert DialogNewAvatarNewButtonNewBadgeNewBreadcrumbNewCardNewCheckboxNewComboboxNewRadio GroupNewCommandNewDialogNewDrawerNewDropdown MenuNewFormNewHover CardNewInputNewLabelNewMenubarNewNavigation MenuNewPaginationNewPopoverNewProgressNewResizableNewScroll AreaNewSelectNewSeparatorNewSkeletonNewSliderNewSwitchNewTableNewTabsNewToastNewTooltipNew

    Docs
    Accordion

    Accordion

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

    Loading...

    Installation

    Install the following dependencies:

    npm install @radix-ui/react-accordion

    Copy and paste the following code into your project.

    Copy and paste the Accordion code into your project.

    Update tailwind.config.js

    Add the following animations to your tailwind.config.js file:

    tailwind.config.js
    /** @type {import('tailwindcss').Config} */
    module.exports = {
      theme: {
        extend: {
          keyframes: {
            "accordion-down": {
              from: { height: "0" },
              to: { height: "var(--radix-accordion-content-height)" },
            },
            "accordion-up": {
              from: { height: "var(--radix-accordion-content-height)" },
              to: { height: "0" },
            },
          },
          animation: {
            "accordion-down": "accordion-down 0.2s ease-out",
            "accordion-up": "accordion-up 0.2s ease-out",
          },
        },
      },
    }
    InstallationAlert