Skip to content

Add lazy-mount options where appropriate. #1847

Description

@kotAPI

Description

Add lazy-mount options where appropriate for components that render non-visible content eagerly.

This should be limited to components where deferred mounting can reduce initial render cost without breaking expected behavior, accessibility, or composition patterns.

Examples

Potential candidates:

  • Tabs.Content
    Only mount the active panel instead of rendering every panel up front when there are many tabs or heavy panel contents.

  • Accordion.Content
    Delay mounting collapsed content until a section is opened, especially when panels contain expensive trees.

  • Dialog, Popover, or DropdownMenu content
    Avoid mounting overlay content before the overlay is opened if that content is not needed for initial render.

  • Tooltip / HoverCard
    Defer rendering floating content until interaction happens instead of mounting all hidden overlays eagerly.

  • large composed lists inside overlays
    If a menu or popover contains a heavy subtree, lazy mounting can avoid paying that cost before the user opens it.

Acceptance Criteria

  1. Appropriate components are reviewed for lazy-mount support.
  2. Lazy-mount options are added only where behavior remains predictable and accessible.
  3. Tests cover mount/unmount behavior and any affected lifecycle expectations.
  4. Docs/storybook are updated for any new API or behavior.
  5. Add a changeset only if there is user-facing impact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    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