Skip to content

[tabs] Add Tabs.Panels component with value state in render function? #1486

Open
@benface

Description

@benface

Feature request

Summary

I would like to have more control over how tab panels are rendered, and one way to achieve that would be a Tabs.Panels component that, like other components, would accept a render function that would get passed some state... however, unlike Tabs.Root and Tabs.List, that state would include the current value so that I can use something like Motion's AnimatePresence component to transition from the previous tab panel to the current one.

Examples in other libraries

Headless UI has a TabPanels component that has a selectedIndex render prop.

Motivation

Kind of answered in "Summary". Thank you!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions