nextjs-toploader
nextjs-toploader copied to clipboard
Maybe more clarification in the documentation for prop color
At first I thought color
only works with hex string,
then I figured out something like this also works.
const primaryRef = useRef('var(--primary)')
return (
<NextTopLoader
color={`hsl(${primaryRef.current})`}
showSpinner={showSpinner}
/>
)