Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add typing animation on employee card hover #16

Open
ajmeese7 opened this issue Jul 10, 2022 · 1 comment
Open

Add typing animation on employee card hover #16

ajmeese7 opened this issue Jul 10, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ajmeese7
Copy link
Member

Idea inspired by the awesome suggestion from @pirijan here.

@ajmeese7 ajmeese7 self-assigned this Jul 10, 2022
@ajmeese7 ajmeese7 added enhancement New feature or request good first issue Good for newcomers labels Jul 10, 2022
@lodenrogue
Copy link

lodenrogue commented Jul 10, 2022

You could do something like this for a typing animation effect:

function type(words, delay, callback) {
    for(let i = 0; i <= words.length; i++) {
        let timeoutDelay = delay * (i + 1);
        setTimeout(() => callback(words.slice(0, i)), timeoutDelay);
    }
}

Callback is a function that takes a string as an argument. It'll be called with the progress of the typing. You can use this callback to update your UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants