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

https://github.com/github/typing-effect-element

A custom element that shows text as if it were being typed
https://github.com/github/typing-effect-element

custom-elements keep web-components

Last synced: 10 months ago
JSON representation

A custom element that shows text as if it were being typed

Awesome Lists containing this project

README

          

# <typing-effect> element

A custom element that shows text as if it were being typed

## Installation

```
$ npm install @github/typing-effect-element
```

## Usage

```js
import '@github/typing-effect-element'
```

```html


|

```

## Accessibility

This component detects whether `prefers-reduced-motion` is set on the window:

```js
window.matchMedia('(prefers-reduced-motion)').matches === true
```

If this evaluates to true, any content lines provided will be appended immediately rather than being typed out with a delay.

## Browser support

Browsers without native [custom element support][support] require a [polyfill][].

- Chrome
- Firefox
- Safari
- Microsoft Edge

[support]: https://caniuse.com/#feat=custom-elementsv1
[polyfill]: https://github.com/webcomponents/custom-elements

## Development

```
npm install
npm test
```

## License

Distributed under the MIT license. See LICENSE for details.