agustinusnathaniel.com

Overflow Scroll without Scrollbar

for sleek overflow scroll in mobile viewport

227 views

CSS

css
.some-component {
  overflow-x: scroll; /* or overflow-y */
}

.some-component::-webkit-scrollbar {
  display: none;
}

Chakra-UI

jsx
<Flex overflow="scroll" css={{ "&::-webkit-scrollbar": { display: "none" } }}>
  ...some children
</Flex>

References

  • https://stackoverflow.com/questions/65042380/how-to-add-webkit-scrollbar-pseudo-element-in-chakra-ui-element-react

BaseBookmarksT.I.L.TemplatesTimelineAnalytics

© 2024 Agustinus Nathaniel