Mantine Marquee Component
Overview
This component is created on top of the Mantine library.
It allows to create a marquee effect with any content.
You can find more components on the Mantine Extensions Hub library.
Installation
npm install @gfazioli/mantine-marquee
or
yarn add @gfazioli/mantine-marquee
After installation import package styles at the root of your application:
import '@gfazioli/mantine-marquee/styles.css';
Usage
import { Marquee } from '@gfazioli/mantine-marquee';
function Demo() {
function BoxComponent({ children, ...props }: { children: ReactNode; [key: string]: any }) {
return (
<Box {...props} p="md" w="200px" c="white" style={{ borderRadius: '8px' }}>
{children}
</Box>
);
}
return (
<Marquee {...props} w={560} h={300}>
<BoxComponent bg="red">Hello World #1</BoxComponent>
<BoxComponent bg="cyan">Hope you like it #2</BoxComponent>
<BoxComponent bg="blue">Have a nice day #3</BoxComponent>
<BoxComponent bg="lime">Goodbye #4</BoxComponent>
</Marquee>
);
}