Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ormesam/blazor-typewriter

A simple typewriter effect library for Blazor applications
https://github.com/ormesam/blazor-typewriter

blazor typewriter typewriter-effect

Last synced: about 2 months ago
JSON representation

A simple typewriter effect library for Blazor applications

Awesome Lists containing this project

README

        

# Blazor Typewriter
A simple typewriter effect library for Blazor applications

## Installation

![Nuget](https://img.shields.io/nuget/v/BlazorTypewriter) ![Nuget](https://img.shields.io/nuget/dt/BlazorTypewriter)

To Install

```
Install-Package BlazorTypewriter
```

or

```
dotnet add package BlazorTypewriter
```

Add stylesheet to head section

```

```

## Usage

![demo](https://user-images.githubusercontent.com/8319419/154805249-51243708-88eb-4b12-af6d-b6a6601d670b.gif)

```html

@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 `` tag and target the `border-color`.

## License

This project is licensed under the terms of the [MIT license](https://github.com/ormesam/blazor-typewriter/blob/master/LICENSE).