sznm.dev

Overflow Scroll without Scrollbar

for sleek overflow scroll in mobile viewport

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

BaseBookmarksTemplatesTimelineAnalytics

© 2020 - 2022 Agustinus Nathaniel