Skip to content

[tabs] Tab transition issue in Preact: new tab content appears before old tab disappears #4127

@Lezvix

Description

@Lezvix

Bug report

Current behavior

When using Base UI Tab components with Preact, there's a visual flickering issue during tab switching. Specifically, when switching between tabs, the new tab content appears before the old tab content disappears, resulting in both tabs being visible simultaneously for a brief moment. This creates an undesirable effect where content from both tabs is rendered at the same time.

Expected #behavior

When switching between tabs, the old tab content should fade out (or hide) completely before the new tab content appears. There should be a clean transition where only one tab's content is visible at any given time. The transition should be smooth without any overlapping or flickering.

Reproducible example

https://stackblitz.com/edit/vitejs-vite-mzgy9913

untitled.mp4

Base UI version

v1.2.0

Which browser are you using?

Firefox 147.0.4
Chrome 145.0.7632.76

Which OS are you using?

Windows 10 19045.5131

Which assistive tech are you using (if applicable)?

None

Additional context

This issue may be related to issue #3958, which addresses similar Preact compatibility problems with transitions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: tabsChanges related to the tabs component.has workaroundThere’s a bug, but users have a complete workaround, so no urgent fix or release is needed.integration: preacttype: regressionA bug, but worse, it used to behave as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions