Skip to content

[tabs] Add keepMounted prop to Tabs.Root for consistency with Accordion.Root #4822

@nami8824

Description

@nami8824

Summary

Add a keepMounted prop to Tabs.Root for consistency with Accordion.Root.

Tabs.Panel already supports keepMounted, but there is no way to set it once for all panels from Tabs.Root.

Motivation

This mainly improves API consistency between Accordion and Tabs.

Today, users can write <Accordion.Root keepMounted>, but need to repeat keepMounted on every Tabs.Panel. A root-level prop would make Tabs match Accordion and provide a convenient default for preserving panel state, avoiding remounts, and supporting measured or animated panel content.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: tabsChanges related to the tabs component.type: enhancementIt’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions