hover-scrollbar
こういうやつを用意しておいて
code:globals.css
@layer utilities {
.hover-scrollbar::-webkit-scrollbar {
@apply w-2;
}
.hover-scrollbar:hover::-webkit-scrollbar {
@apply w-2;
}
.hover-scrollbar:hover::-webkit-scrollbar-thumb {
@apply rounded-md bg-slate-400;
}
}
こんな感じで使う
code:tsx
<div className="hover-scrollbar overflow-y-scroll">
...
</div>