Skip to content
Discussion options

You must be logged in to vote

Hey @polRk,

You can use the data-state (visible or hidden) on the scrollbar to add animations like so:

  '&[data-state="visible"]': {
    animation: `${fadeIn} 300ms ease-out`,
  },
  '&[data-state="hidden"]': {
    animation: `${fadeOut} 300ms ease-out`,
  },

Here's a demo where I've added a fadeIn/fadeOut animation to the basic demo from our website: https://codesandbox.io/s/scrollarea-animated-scrollbar-7eu1y3

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@polRk
Comment options

Answer selected by polRk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants