0.9.1 • Published 3 months ago

react-text-galaxy v0.9.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

React Text Galaxy

This is a text galaxy animation component based on canvas for React.

Galaxy Text Galaxy Preview

Matrix Text Matrix Preview

Parallax Text Parallax Preview

Install

npm i react-text-galaxy

OR

yarn add react-text-galaxy

Import

import { TextGalaxy, TextMatrix, TextParallax } from 'react-text-galaxy';

Use

const [text, setText] = useState<string>("");

<TextGalaxy text={text} />

<TextMatrix text={text} />

<TextParallax text={text} />

Parameters

TextGalaxy

ParameterDescriptionDefault ValueData TypeRequired
textText content""stringYes
spiralSpeedAnimation speed"normal"SpeedTypeNo
fontFont property of text{ sizeInPx: 14, family: "Arial Black" }{ sizeInPx: number, family: string }No
textColorsColors of text line['rgba(166, 213, 119, 1)', 'rgba(67, 128, 50, 1)', 'rgba(1, 68, 33, 0.8)', 'rgba(1, 50, 32, 0.5)']string[]No
backgroundBackground property of canvas{ color: "#081330" }{ color: string }No
sizeSize property of canvas{ width: { value: 100, unit: "%" }, height: { value: 100, unit: "%" } }{ width: { value: number; unit: "px" \| "em" \| "rem" \| "vh" \| "vw" \| "%" }, height: { value: number, unit: "px" \| "em" \| "rem" \| "vh" \| "vw" \| "%" } }No

TextMatrix

ParameterDescriptionDefault ValueData TypeRequired
textText content""stringYes
fallingSpeedAnimation speed"normal"SpeedTypeNo
fontFont property of text{ sizeInPx: 16, family: "Arial Black" }{ sizeInPx: number, family: string }No
textColorsColors of text line['rgba(166, 213, 119, 1)', 'rgba(67, 128, 50, 1)', 'rgba(1, 68, 33, 0.8)', 'rgba(1, 50, 32, 0.5)']string[]No
backgroundBackground property of canvas{ color: "#071104" }{ color: string }No
sizeSize property of canvas{ width: { value: 100, unit: "vw" }, height: { value: 100, unit: "vh" } }{ width: { value: number; unit: "px" \| "em" \| "rem" \| "vh" \| "vw" \| "%" }, height: { value: number, unit: "px" \| "em" \| "rem" \| "vh" \| "vw" \| "%" } }No

TextParallax

ParameterDescriptionDefault ValueData TypeRequired
wordsArray of wordstring[]Yes
movingSpeedAnimation speed"normal"SpeedTypeNo
movingDirectionAnimation direction"right-left"DirectionTypeNo
fontFont property of text{ sizeInPx: 26, family: "Arial Black" }{ sizeInPx: number, family: string }No
textColorsColors of text line['rgba(166, 213, 119, 1)', 'rgba(67, 128, 50, 1)', 'rgba(1, 68, 33, 0.8)', 'rgba(1, 50, 32, 0.5)']string[]No
backgroundBackground property of canvas{ color: "#071104" }{ color: string }No
sizeSize property of canvas{ width: { value: 100, unit: "vw" }, height: { value: 100, unit: "vh" } }{ width: { value: number; unit: "px" \| "em" \| "rem" \| "vh" \| "vw" \| "%" }, height: { value: number, unit: "px" \| "em" \| "rem" \| "vh" \| "vw" \| "%" } }No
0.8.16

3 months ago

0.8.15

3 months ago

0.9.0

3 months ago

0.9.1

3 months ago

0.8.14

3 months ago

0.8.13

3 months ago

0.8.9

3 months ago

0.8.11

3 months ago

0.8.8

3 months ago

0.8.7

3 months ago

0.8.6

3 months ago

0.8.5

3 months ago

0.8.4

3 months ago

0.8.2

3 months ago

0.8.1

3 months ago

0.8.0

4 months ago