Skip to content

Commit db9b372

Browse files
committed
feat: add smooth animation to Accordion component
1 parent 0f526aa commit db9b372

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/ui/src/components/Accordion/AccordionContent.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ export function AccordionContent(props: AccordionContentProps) {
3232
<div
3333
className={twMerge(theme.base, className)}
3434
data-testid="flowbite-accordion-content"
35-
hidden={!isOpen}
35+
style={{
36+
overflow: "hidden",
37+
maxHeight: isOpen ? "1000px" : "0",
38+
transition: "max-height 0.3s ease-in-out",
39+
}}
3640
{...restProps}
3741
/>
3842
);

0 commit comments

Comments
 (0)