generated fromgithub/custom-element-boilerplate
- Notifications
You must be signed in to change notification settings - Fork5
A custom element that shows text as if it were being typed
License
NotificationsYou must be signed in to change notification settings
github/typing-effect-element
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A custom element that shows text as if it were being typed
$ npm install @github/typing-effect-element
import'@github/typing-effect-element'
<typing-effectdata-lines='["Welcome to GitHub!", "Let’s begin the adventure"]'><spandata-target="typing-effect.content"></span><spandata-target="typing-effect.cursor">|</span></typing-effect>
This component detects whetherprefers-reduced-motion
is set on the window:
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.
Browsers without nativecustom element support require apolyfill.
- Chrome
- Firefox
- Safari
- Microsoft Edge
npm installnpm test
Distributed under the MIT license. See LICENSE for details.
About
A custom element that shows text as if it were being typed
Topics
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors7
Uh oh!
There was an error while loading.Please reload this page.