Skip to content

PinInput: Add (auto)focus #3717

@Dominic-Marcelino

Description

@Dominic-Marcelino

Description

It would be great PinInput could get an autofocus prop as well as a manual focus option.

In the normal Input component it's solved by:

  1. an autofocus prop
  2. exposing the inputRef

Additional context

In case not all users have / use 2FA we render the PinInput component dynamically.

In such cases it would be great, if we could autofocus it once rendered. Also an exposed focus method (or an input ref) could allow to focus the first field again, in case the user inserts an invalid OTP.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv3#1289

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions