Skip to content

ScrollShadow with Tabs.ScrollView leaves a right gap #321

@eliotgevers

Description

@eliotgevers

Hi, I tried adding ScrollShadow to a horizontal Tabs.ScrollView in heroui-native to make overflow tabs more obvious, but it left a visible gap on the right edge where part of the tab row still shows through.

Am I using this wrong, or should ScrollShadow already work cleanly with Tabs.ScrollView?

What I tried:

<Tabs.List className="self-stretch overflow-hidden">
  <ScrollShadow className="w-full" orientation="horizontal" size={18} LinearGradientComponent={LinearGradient}>
    <Tabs.ScrollView className="w-full" contentContainerClassName="gap-2" showsHorizontalScrollIndicator={false}>
      <Tabs.Indicator className="top-[3px]" />
      {/* tab triggers */}
    </Tabs.ScrollView>
  </ScrollShadow>
</Tabs.List>

This extra top-[3px] hack fixes the selected-tab vertical offset on my side, but it is not a nice solution.

A simple built-in prop on Tabs/Tabs.ScrollView to enable or disable an edge fade/shadow would be great, because sometimes labels align at the end and it does not look like there is more to discover on the right.

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions