Skip to content

bug: Performance lag when switching tabs containing ApexCharts #123

@areski

Description

@areski

What version of FlyonUI are you using?

v2.4.1

Which browsers are you seeing the problem on?

Chrome

Reproduction URL

https://flyonui.com/docs/navigations/tabs-pills/

Describe your issue

When using FlyonUI tabs with charts (eg ApexCharts), switching between tabs causes significant lag, with high INP (Interaction to Next Paint) times in Chrome. This happens because of how FlyonUI hides inactive tabs (likely via display: none).

ApexCharts renders charts in SVG and requires knowledge of the container size at render time.

When the container is hidden (display: none), it has zero dimensions, so ApexCharts must reflow and redraw the chart when the tab becomes active.

Idea to fix:
Change tab implementation to use visibility: hidden instead of display: none for inactive tabs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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