UNPKG

@neynar/ui

Version:

React UI component library built on shadcn/ui and Tailwind CSS

67 lines (56 loc) 1.63 kB
# AccordionContent **Type**: component AccordionContent - Collapsible content area of an accordion item The expandable content section that is revealed or hidden when the associated AccordionTrigger is activated. Features smooth height-based animations using Tailwind CSS keyframes and supports any React content including complex layouts. ## JSX Usage ```jsx import { AccordionContent } from '@neynar/ui'; <AccordionContent className="value" forceMount={value} > {/* Your content here */} </AccordionContent> ``` ## Component Props ### className - **Type**: `string` - **Required**: No - **Description**: No description available ### children - **Type**: `React.ReactNode` - **Required**: No - **Description**: No description available ### forceMount - **Type**: `true` - **Required**: No - **Description**: No description available ## Examples ### Example 1 ```tsx // Simple text content <AccordionContent> <p>This content is revealed when the accordion is expanded.</p> <p>It can contain any React components or HTML elements.</p> </AccordionContent> ``` ### Example 2 ```tsx // Rich content with components <AccordionContent> <div className="space-y-4"> <Alert> <InfoIcon className="h-4 w-4" /> <AlertTitle>Important Note</AlertTitle> <AlertDescription>This is highlighted information.</AlertDescription> </Alert> <Button variant="outline">Take Action</Button> </div> </AccordionContent> ``` ### Example 3 ```tsx // Content with custom padding <AccordionContent className="pt-6 pb-6"> Content with extra vertical padding for better spacing. </AccordionContent> ```