Skip to main content

Ticker

A scrolling text component for displaying continuous or animated text content.

Installation

import { Ticker } from "@/core/components/Ticker";

Basic Usage

import React from "react";
import { Ticker } from "@/core/components/Ticker";

export default function TickerExample() {
return <Ticker text="This is a scrolling ticker message" />;
}

Props

PropTypeDefaultDescription
textstring-Required. Text to display in the ticker
speednumber50Animation speed in pixels per second
direction"left" | "right""left"Scroll direction
pauseOnHoverbooleanfalseWhether to pause animation on hover
loopbooleantrueWhether to loop the animation
styleStyleProp<ViewStyle>-Additional styles
textStyleStyleProp<TextStyle>-Text styles

Usage Examples

Basic Ticker

<Ticker text="Breaking news: This is important information!" />

Custom Speed and Direction

<Ticker text="Slow moving ticker" speed={20} direction="right" />

Styled Ticker

<Ticker
text="Styled ticker message"
textStyle={{ color: "red", fontSize: 18 }}
style={{ backgroundColor: "#f0f0f0" }}
/>