Accordion
A dropdown component for toggling content
import { Accordion } from "@visulima/nextra-theme-docs/components";<Accordion title="I am an Accordion.">You can put any content in here.</Accordion>
import { Accordion } from "@visulima/nextra-theme-docs/components";<Accordion title="I am an Accordion." styleType="flushed"> You can put any content in here.</Accordion>
APIPermalink for this section
The Accordion
component takes the following props:
title
Permalink for this section
Title in the Accordion preview.
- Type:
string
- Required:
true
children
Permalink for this section
Content below the title in the Accordion preview.
- Type:
ReactNode
- Required:
true
styleType
(optional)Permalink for this section
You can choose between rounded
and flushed
style.
- Type:
rounded | flushed
- Default:
rounded
defaultOpen
(optional)Permalink for this section
Whether the Accordion is open by default.
- Type:
boolean
- Default:
false
classes
(optional)Permalink for this section
The classes attribute specifies button
and content
.
- Type:
object
- title:
string
- content:
string
- title:
- Default:
{}
arrowIcon
(optional)Permalink for this section
The arrowIcon of the Accordion.
- Type:
({ className }: { className?: string }) => ReactNode