React Native MantineMiscellaneous

Marquee

Continuously scrolling content loop

Import: import { Marquee } from 'react-native-mantine';

Usage

import { Badge, Marquee } from 'react-native-mantine';

<Marquee duration={20000} gap="md">
  <Badge color="blue">React</Badge>
  <Badge color="grape">React Native</Badge>
  <Badge color="teal">TypeScript</Badge>
</Marquee>

// Vertical marquee
<Marquee
  orientation="vertical"
  duration={12000}
  style={{ height: 120 }}
>
  <Text>First announcement</Text>
  <Text>Second announcement</Text>
</Marquee>

Props

PropTypeDefaultDescription
children (required)React.ReactNodeContent that is scrolled
reversebooleanfalseIf set, the content is scrolled in the opposite direction
orientation'horizontal' | 'vertical'"horizontal"Scroll orientation
repeatnumber4Number of content copies rendered to create a seamless loop
durationnumber100000Duration of one full loop in ms
gapnumber | "xs" | "sm" | "md" | "lg" | "xl""md"Key of theme.spacing or number, gap between content copies
fadeEdgesbooleantrueDetermines whether edges should be faded with a gradient
fadeEdgeColorMantineColorColor of the fade gradient, should match the background the component is rendered on
fadeEdgeSizenumber | string"10%"Size of the fade gradient
styleViewStyleAdditional styles to apply to the root element

Source on GitHub · npm