-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
34 lines (32 loc) · 912 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Typecraft Test</title>
<script src="./dist/text-typecraft-js.umd.js"></script>
<style>
#typecraft {
font-size: 24px;
font-family: monospace;
margin: 20px;
}
</style>
</head>
<body>
<div id="typecraft"></div>
<script>
document.addEventListener('DOMContentLoaded', function () {
const element = document.getElementById('typecraft');
const typecraft = new Typecraft(element, {
strings: ['Hello, World!', 'This is a test.', 'Looping...'],
loop: true,
autoStart: true,
pauseFor: 1000,
deleteSpeed: 50,
});
// You don't need to call start() because autoStart is true
});
</script>
</body>
</html>