Code Monkey home page Code Monkey logo

Comments (6)

andreaswilli avatar andreaswilli commented on June 25, 2024 1

I added a complete example to the docs.

from react-verification-input.

andreaswilli avatar andreaswilli commented on June 25, 2024

Depends on what you mean by "blinking cursor":

  • If you mean a native cursor: This is not possible since the visible part of the component is not acutally an input element.
  • If you mean the selected field indicator: You can make it blink using a css animation like so:
.character--selected {
  animation: blink 1s infinite;
}

@keyframes blink {
  0% {
    outline: orange 3px solid;
  }
  50% {
    outline: orange 3px solid;
  }
  51% {
    outline: none;
  }
  100% {
    outline: none;
  }
}

from react-verification-input.

broodfusion avatar broodfusion commented on June 25, 2024

Thanks I've figured it out using a similar solution

from react-verification-input.

giopetris avatar giopetris commented on June 25, 2024

@broodfusion were you able to make this look like a real cursor?

from react-verification-input.

billsbooth avatar billsbooth commented on June 25, 2024

The example doesn't properly align the baseline of the character and the blinker...

Screenshot 2024-02-09 at 9 38 45 PM

from react-verification-input.

andreaswilli avatar andreaswilli commented on June 25, 2024

It's an example to use as a starting point.
Feel free to adapt the values, as they depend on the concrete typeface, etc.
That's also why this is not built into the library.

from react-verification-input.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.