Skip to content

A simple typewriter effect library for Blazor applications

License

Notifications You must be signed in to change notification settings

ormesam/blazor-typewriter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blazor Typewriter

A simple typewriter effect library for Blazor applications

Installation

Nuget Nuget

To Install

Install-Package BlazorTypewriter

or

dotnet add package BlazorTypewriter

Add stylesheet to head section

<link href="_content/BlazorTypewriter/styles.css" rel="stylesheet" />

Usage

demo

<p><Typewriter Builder="@typewriter" /></p>

@code {
    TypewriterBuilder typewriter = new TypewriterBuilder(defaultCharacterPause: 6)
        .TypeString("First line... Lorem ipsum dolor sit amet, consectetur adipiscing elit.")
        .Pause(1000)
        .DeleteAll()
        .TypeString("Second line... Lorem ipsum dolor sit amet, consectetur adipiscing elit.", 50)
        .Pause(500)
        .DeleteAll(30)
        .TypeString("Third line... Lorem ipsum dolor sit amet, consectetur adipiscing elit.", 20)
        .Pause(500)
        .DeleteAll(20)
        .Pause(500)
        .Loop();
}

To customise the cursor set the CustomClass property of the <Typewriter> tag and target the border-color.

License

This project is licensed under the terms of the MIT license.

About

A simple typewriter effect library for Blazor applications

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published