[tabs] Add keepMounted prop to Tabs.Root for consistency with Accordion.Root
Open
component: tabs
type: enhancement
- Dominant language
- TypeScript
- Stars
- 10.9k
- Forks
- 543
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 101
Description
## 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 ``, 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.
Contributor guide
Assessment
This issue has not been assessed yet.