Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion js/react/lib/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

--color-light: #fafafa;
--color-dark: #2e2e2e;
--color-gray: #D9D9D9;
--color-gray: #d9d9d9;

/* Fonts */
--text-xxs: 10px;
Expand Down Expand Up @@ -303,3 +303,30 @@
@apply desktop:text-[40px];
}
}

@layer utilities {
@supports not selector(::-webkit-scrollbar) {
.scrollbar {
scrollbar-color: var(--color-neutral-300) var(--color-neutral-100);

@variant dark {
scrollbar-color: var(--color-neutral-900) var(--color-neutral-600);
}
}
}

.scrollbar::-webkit-scrollbar {
@apply w-4;
}

.scrollbar::-webkit-scrollbar-track {
@apply rounded-full bg-neutral-100 dark:bg-neutral-900;
}

.scrollbar::-webkit-scrollbar-thumb {
@apply rounded-full bg-neutral-300 transition dark:bg-neutral-600;
}
.scrollbar::-webkit-scrollbar-thumb:hover {
@apply opacity-90;
}
}
5 changes: 5 additions & 0 deletions js/react/showcase/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ export function App() {
},
}}
/>
<ShowComponent title="Scroll bar ">
<div className="scrollbar mx-auto h-48 w-full overflow-auto">
<div className="mx-auto flex h-96 w-20 items-center">Container</div>
</div>
</ShowComponent>
</div>
);
}