Add Base UI accordion component with high-level wrapper#36
Merged
carlosabadia merged 2 commits intomainfrom Jul 31, 2025
Merged
Add Base UI accordion component with high-level wrapper#36carlosabadia merged 2 commits intomainfrom
carlosabadia merged 2 commits intomainfrom
Conversation
- Create accordion component following established reflex-ui patterns - Implement AccordionRoot, AccordionItem, AccordionHeader, AccordionTrigger, AccordionPanel components - Add HighLevelAccordion wrapper with trigger and content props as requested - Follow BaseUIComponent pattern with proper Base UI integration - Add component to lazy loader system in __init__.py - Add accordion example to demo application - All prop descriptions sourced from Base UI documentation JSON files - Component tested and working correctly with expand/collapse functionality Co-Authored-By: Carlos Cutillas <carlos@reflex.dev>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Base UI accordion component with high-level wrapper
Summary
This PR implements a complete Base UI accordion component wrapper for reflex-ui, following the established patterns used by other components like tooltip and select. The implementation includes:
AccordionRoot,AccordionItem,AccordionHeader,AccordionTrigger,AccordionPanelHighLevelAccordionthat acceptstriggerandcontentprops as requestedaccordion.root(),accordion.item()) and high-level API (accordion())@base_ui/react/accordionThe component was tested locally and confirmed to work with proper expand/collapse functionality.
Review & Testing Checklist for Human
accordion.root(),accordion.item(), etc. work for advanced use casesRecommended test plan: Run the demo app, interact with the accordion, try creating custom accordion layouts using both high-level and compositional APIs.
Diagram
%%{ init : { "theme" : "default" }}%% graph TD A["reflex_ui/__init__.py"]:::major-edit --> B["components/base/accordion.py"]:::major-edit A --> C["components/base/tooltip.py"]:::context B --> D["Base UI accordion library"]:::context B --> E["BaseUIComponent"]:::context F["demo/demo/demo.py"]:::minor-edit --> A G["Browser Test"]:::context --> F subgraph Legend L1["Major Edit"]:::major-edit L2["Minor Edit"]:::minor-edit L3["Context/No Edit"]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes
HighLevelCollapsiblefor consistencySession requested by: Carlos Cutillas (carlos@reflex.dev)
Link to Devin run: https://app.devin.ai/sessions/e21529f7d4eb4e66bd03e34ad963fbe4