useAccordion
install | yarn add @react-aria/accordion |
---|---|
version | 3.0.0-alpha.1 |
usage | import {useAccordion} from '@react-aria/accordion' |
API#
useAccordion<T>(
props: AriaAccordionProps<T>,
state: TreeState<T>,
ref: RefObject<HTMLDivElement>
): AccordionAria
Features#
Describe what the aria hook helps with/provides.
Anatomy/Usage#
For hooks that are meant to be used with specific elements/components, include an Anatomy section detailing the props the hook returns. For hooks that are meant for more general use, include a Usage section detailing the props/params the hook accepts and returns.
Name | Type | Description |
accordionProps | HTMLAttributes<HTMLElement> | Props for the accordion container element. |
Usage#
List the props/params that the hook uses and list the props that the hook returns.
Name | Type | Description |
accordionProps | HTMLAttributes<HTMLElement> | Props for the accordion container element. |
Example#
Add an example of the hook (being used with native elements, etc)
Internationalization#
Mention if RTL