A web component for animating "power words" in HTML header elements (vue component version coming soon!)
<head>
<script src="rolodex.js" type="module"></script>
</head>
<body>
<!-- I'd probably never actually break a text component down like this, but for line length sake... -->
<h1>
GitHub... the most
<rolodex-animation options='["amazing", "wonderful", "incredible"]'</rolodex-animation>
GIT repository in the world!
</h1>
</body>
Screen.Recording.2024-11-25.at.9.20.01.PM.mov
option | required | default | description |
---|---|---|---|
interval | No | 3000 | Interval milliseconds for time between animations |
options | Yes | [] | An array of text options to animate through |
transition-duration | No | 1 | Number of seconds of the animation in and out |
transition-timing-function | No | "ease-in" | Animation curve of elements coming in and out |
- Importable into any web project using JavaScript on the client (all of them?), regardless of CSS, SCSS/SASS, Less, etc.
- Ability to connect with multiple user targets with the same copy (i.e. instead of rendering different text for different targets, such as mac or Linux uses for a CLI, you could just say:
<body>
<h1>Attention <rolodex-animation='["Mac", "Linux"]'></rolodex-animation> users!</h1>
</body>
Uploading Screen Recording 2024-11-25 at 9.25.22 PM.mov…
The original contacts app...
![rolodex](https://private-user-images.githubusercontent.com/6319532/389560953-787bc819-2650-4051-ba7a-8317922557b3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5OTkzMTUsIm5iZiI6MTczODk5OTAxNSwicGF0aCI6Ii82MzE5NTMyLzM4OTU2MDk1My03ODdiYzgxOS0yNjUwLTQwNTEtYmE3YS04MzE3OTIyNTU3YjMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDhUMDcxNjU1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZTRhYjcyOGMyOGNjNmEyOTY0MjliOTQ3MWM5ZWQ5YjA3NTAxZjBmNDRhMmEyYWI4Njk2MTUxMzA3YzE4MDMzMCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.EIfuLIbreJGkoxJxJADCsRd3xq2WGSBKu4NNmHkrhqo)
I chose a very complex, but highly optimal, type-safe, scalable, and reliable tech stack...
- HTML
- CSS
- Vanilla JavaScript