A universal ticker (marquee) package with one shared interaction runtime across React, Vue, Svelte, vanilla JS, and browser/CDN usage.
npm install @samline/ticker
bun add @samline/ticker
import '@samline/ticker/style.css'
import { createTicker } from '@samline/ticker'
const ticker = createTicker({
duration: 20,
direction: 'left',
content: 'Your ticker content here'
})
ticker.mount()
import '@samline/ticker/style.css'
import { Ticker } from '@samline/ticker/react'
function App() {
return (
<Ticker.Root duration={20} direction="left">
<span>Your ticker content</span>
<span>More content</span>
</Ticker.Root>
)
}
<script setup>
import { Ticker } from '@samline/ticker/vue'
import '@samline/ticker/style.css'
</script>
<template>
<Ticker :duration="20" direction="left">
<span>Your ticker content</span>
<span>More content</span>
</Ticker>
</template>
<script>
import { Ticker } from '@samline/ticker/svelte'
import '@samline/ticker/style.css'
</script>
<Ticker duration={20} direction="left">
<span>Your ticker content</span>
<span>More content</span>
</Ticker>
@samline/ticker: vanilla API and shared runtime helpers@samline/ticker/react: React component API@samline/ticker/vue: Vue component API@samline/ticker/svelte: Svelte component API@samline/ticker/browser: browser global for CDN or plain HTML@samline/ticker/core: controller and state contracts only@samline/ticker/style.css: shared stylesAll entrypoints share the same options:
| Option | Type | Default | Description |
|---|---|---|---|
duration |
number |
20 |
Animation duration in seconds |
direction |
'left' | 'right' |
'left' |
Animation direction |
pauseOnHover |
boolean |
false |
Pause animation on hover |
class |
string |
'' |
Additional CSS class |
prefers-reduced-motion for accessibility.MIT