ormesam / blazor-typewriter

A simple typewriter effect library for Blazor applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:MIT License


Languages

Language:C# 60.6%Language:HTML 31.9%Language:CSS 7.4%