Skip to content

RadioGroup and CheckboxGroup Add Unexpected Space Below Scrollable Div #7728

Closed
@jared-christensen

Description

@jared-christensen

Provide a general summary of the issue here

When placing a <RadioGroup> or <CheckboxGroup> inside a div styled with height: 100vh and overflow: auto, an unexpected blank space appears below the div. This space should not exist, and it causes layout issues.

🤔 Expected Behavior?

  • The div should take up exactly the full viewport height (100vh) and should not have any extra space below it.
  • Scrolling should be contained within the div, and no additional whitespace should be added by RadioGroup or CheckboxGroup.

😯 Current Behavior

  • Extra space appears below the div when using RadioGroup or CheckboxGroup.
  • The issue does not happen with standard form elements like or .
  • This causes unintended scrolling behavior when navigating items inside the div.

💁 Possible Solution

If I add position fixed to the HTML tag I can work around it for now.

🔦 Context

This issue makes it difficult to create full-screen, scrollable sections that include RadioGroup or CheckboxGroup. It affects UI consistency and forces developers to find workarounds.

🖥️ Steps to Reproduce

  1. Create a div styled with height: 100vh and overflow: auto.
  2. Place a RadioGroup or CheckboxGroup inside the div.
  3. Notice that extra space appears below the div.

https://www.loom.com/share/f0c32799b3434ef78ed4f01c70cc4c57?sid=50634b85-6899-4abc-bbf8-67c9df8d99c0
https://codesandbox.io/p/sandbox/crazy-voice-rp2y77

Version

"react-aria": "^3.35.1", "react-aria-components": "^1.4.1",

What browsers are you seeing the problem on?

Chrome

If other, please specify.

Edge and Safari

What operating system are you using?

Mac OS 15.3

🧢 Your Company/Team

Dice

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions