All Projects β†’ leonardodino β†’ rci

leonardodino / rci

Licence: MIT license
πŸ”’β€‚better code inputs for react/web

Programming Languages

typescript
32286 projects
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to rci

Onetimepassword
πŸ”‘ A small library for generating TOTP and HOTP one-time passwords on iOS.
Stars: ✭ 243 (-69.81%)
Mutual labels:  totp, 2fa
SimpleTOTP
A highly configurable yet simple to use TOTP based two-factor authentication processing module for SimpleSAMLphp.
Stars: ✭ 16 (-98.01%)
Mutual labels:  totp, 2fa
Core Components
Accessible and lightweight Javascript components
Stars: ✭ 85 (-89.44%)
Mutual labels:  input, a11y
Twofactor totp
πŸ”‘ Second factor TOTP (RFC 6238) provider for Nextcloud
Stars: ✭ 203 (-74.78%)
Mutual labels:  totp, 2fa
apache 2fa
Apache two-factor (2FA) authentication with Google Authenticator based on Time-based One-Time Password (TOTP) or HMAC-based one-time password (HOTP) Algorithms.
Stars: ✭ 63 (-92.17%)
Mutual labels:  totp, 2fa
Go Guardian
Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication.
Stars: ✭ 204 (-74.66%)
Mutual labels:  totp, 2fa
totp.js
Time-based One-time Password Algorithm By Javascript
Stars: ✭ 26 (-96.77%)
Mutual labels:  totp, 2fa
Nimble totp
A tiny Elixir library for time-based one time passwords (TOTP)
Stars: ✭ 139 (-82.73%)
Mutual labels:  totp, 2fa
makeup-js
Mono-repo for all vanilla JavaScript utility modules and headless ui
Stars: ✭ 28 (-96.52%)
Mutual labels:  a11y, headless-ui
otp-java
A small and easy-to-use one-time password generator library for Java according to RFC 4226 (HOTP) and RFC 6238 (TOTP).
Stars: ✭ 107 (-86.71%)
Mutual labels:  totp, 2fa
Python Bna
Python implementation of the mobile Blizzard Authenticator (TOTP)
Stars: ✭ 165 (-79.5%)
Mutual labels:  totp, 2fa
crystal-two-factor-auth
Two Factor Authentication Crystal code implementing the Time-based One-time Password Algorithm
Stars: ✭ 24 (-97.02%)
Mutual labels:  totp, 2fa
Authenticatorpro
πŸ“± Two-Factor Authentication (2FA) client for Android + Wear OS
Stars: ✭ 155 (-80.75%)
Mutual labels:  totp, 2fa
Freeotpplus
Enhanced fork of FreeOTP-Android providing a feature-rich 2FA authenticator
Stars: ✭ 223 (-72.3%)
Mutual labels:  totp, 2fa
Aegis
A free, secure and open source app for Android to manage your 2-step verification tokens.
Stars: ✭ 2,692 (+234.41%)
Mutual labels:  totp, 2fa
crotp
CrOTP - One Time Passwords for Crystal
Stars: ✭ 62 (-92.3%)
Mutual labels:  totp, 2fa
Nim websitecreator
Nim fullstack website framework - deploy a website within minutes
Stars: ✭ 124 (-84.6%)
Mutual labels:  totp, 2fa
One Time
One Time Password (TOTP and HOTP) library for Clojure. TOTP/HOTP is widely used for Two Factor / Multi Factor Authentication.
Stars: ✭ 129 (-83.98%)
Mutual labels:  totp, 2fa
AspNetCoreBackChannelLogout
ASP.NET Core Back-Channel Logout for Hybrid Clients, Redis, Key Vault, Azure
Stars: ✭ 17 (-97.89%)
Mutual labels:  totp, 2fa
totp
Time-Based One-Time Password Code Generator
Stars: ✭ 76 (-90.56%)
Mutual labels:  totp, 2fa

rci "react code input"

better segmented code inputs for the web. primary goals:

  • improved accessibility
  • operating system integration
  • consistent, cross-platform, experience

Compared

img-single-input img-multi-input img-rci
regular input multi-input rci

rci uses a single DOM input element, overlayed on top of plain divs for styling. most other implementations of this pattern are based on multiple inputs.

using multiple inputs gives out-of-the-box style consistency, but comes with the disadvantage of JavaScript hacks to deal with focus shifting and pasting, and accessibility issues.

using a single input (rci approach) allows for:

  • native keyboard shortcuts and selection (including selecting multiple segments)
  • ✨autocomplete magic✨
  • improved accessibility (<label>, tabIndex, minLength/maxLength, etc)

Demo

https://codesandbox.io/s/rci-codeinput-812up?file=/src/Example.tsx

Packages

This repository hosts a few npm packages, the most relevant ones being:

most users will be better served by using rci, as the internals of this component won't vary much from app to app.

the hook package is intended for usage only in design system projects which wish to retain absolute control of rendered DOM elements.

Styling

packages in this repo don't bundle any built-in style, besides the base minimum for it to function (zIndex, positioning, etc).

for styling you can pass a top-level className directly to CodeInput, all DOM elements rendered by CodeInput contain a data-code-input attribute that can be used to target them individually.

Bundle size

despite not being part of the primary goals, weight is heavily considered while developing.

package size
rci
use-code-input
use-is-focused

Caveats

there's currently no support for displaying separators between sequences (example: ___-___).

for simplicity of implementation and to reduce the amount of CSS the user needs to provide, this component assumes a font with fixed advances for the characters accepted. this means using a monospaced or tabular lining font for numeric values. for alphanumeric values the font must be monospaced.

this project is still pending a thorough a11y validation. for cases in which accessibility is paramount, please use a simple native single input.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].