Skip to content

A Compose Multiplatform Typing Animation Library for Android, iOS, Desktop and Web

License

Notifications You must be signed in to change notification settings

zeeshanali-k/Typist-CMP

Repository files navigation

Maven Central

Typist-CMP

A Compose Multiplatform Text Typing Animation Library for Android, iOS, Desktop and Web. Visit this link to checkout Typist for Jetpack Compose.

Pass multiple strings and infinite repititions option

Usage

Add this to your project level "build.gradle" or in newer versions of gradle in "settings.gradle" under repositories section:

repositories {
  mavenCentral()
}

Add this to your shared module build.gradle file in commonMain under dependencies section:

api("tech.dev-scion:typist-cmp:TAG")

Replace TAG with library version

Add Typist Composable to your app and configure accordingly:

Typist(
    text = "Hi! I am Typist.",
    modifier = Modifier
                .align(Alignment.Center),
    typistSpeed = TypistSpeed.NORMAL,
    textStyle = TextStyle(
        color = Color.Red,
        fontWeight = FontWeight.Bold,
        fontSize = 28.sp,
        textAlign = TextAlign.Center,
        isBlinkingCursor = true, // if true the cursor will keep blinking
        isInfiniteCursor = false, // if true the cursor will not hide even after the text has been written
        isCursorVisible = true, // if true the cursor will not be visible at all
    ),
onAnimationEnd = {},
onAnimationStart = {}
)