Container Nesting Guide

April 2, 2026 ยท View on GitHub

Reference for which components can be nested inside others.

Container Nesting Guide

Not sure if you can put one component inside another? This matrix covers the common cases:

Inner / OuterBoxScrollViewModalTabsAccordion
Boxyesyes (sticky)yesyesyes
Textyesyesyesyesyes
TextInputyesyesyesyesyes
ScrollViewyesyes (nested)yesyesyes
Modalyesyesyesyes (nested)yes
Tabsyesyesyescautionyes
Selectyesyesyesyesyes
Accordionyesyesyesyescaution

Notes:

  • ScrollView inside ScrollView: The outer ScrollView captures scroll events by default. Click or focus the inner ScrollView to route scroll input there instead. Hit-testing determines which ScrollView receives mouse wheel events.
  • Modal inside Modal: Focus is trapped in the innermost visible modal. Closing the inner modal restores focus to the outer modal automatically.
  • Tabs inside Tabs: This works, but the Tab key only affects the focused Tabs instance. If both are on screen, make sure focus is routed correctly (e.g. via isFocused props) so users can reach both.
  • Accordion inside Accordion: Works, but deeply nested accordions can be hard to navigate. Consider flattening the hierarchy or using a Tree component instead.

Back to Components