Skip to content

feat: add OTP Input Component (#1200)#1250

Merged
SAPTARSHI-coder merged 1 commit into
SAPTARSHI-coder:mainfrom
Pcmhacker-piro:feat/otp-input-1200
Jun 4, 2026
Merged

feat: add OTP Input Component (#1200)#1250
SAPTARSHI-coder merged 1 commit into
SAPTARSHI-coder:mainfrom
Pcmhacker-piro:feat/otp-input-1200

Conversation

@Pcmhacker-piro
Copy link
Copy Markdown

@Pcmhacker-piro Pcmhacker-piro commented Jun 4, 2026

Closes #1200

Pull Request Description

Adds a one-time password input component in submissions/examples/otp-input/ with 6 digit boxes, auto-focus, backspace/paste/arrow key support, and animated states (pulse on empty, pop on fill, shake on error, staggered success reveal).


Type of Change

  • 🧩 New component

Submission Checklist

  • All changes are inside submissions/examples/otp-input/
  • Includes demo.html — self-contained, opens in browser with no server
  • Includes style.css — raw CSS for the proposed feature
  • Includes README.md — what it does, how to use it, why it fits EaseMotion CSS
  • No changes to core/
  • No changes to components/
  • One feature per PR (no bundled unrelated changes)

Feature Description

What does this add?

A row of 6 individual digit input boxes for OTP/verification codes with auto-focus, backspace-to-previous, paste filling, arrow key navigation, and animated visual states.

How does a developer use it?

<div class="ease-otp-input" data-ease-otp-length="6">
  <input class="ease-otp-box" type="text" inputmode="numeric" maxlength="1" autocomplete="one-time-code" />
  <!-- 5 more boxes -->
</div>
Why does it fit EaseMotion CSS?
Four animated keyframe states: ease-kf-otp-pulse (waiting), ease-kf-otp-pop (digit fill), ease-kf-otp-shake (error), and ease-kf-otp-success-pop (staggered 6-box success). Smooth border/transform transitions. Respects prefers-reduced-motion.
Demo
- Demo added (demo.html works by opening directly in a browser)
Browser Testing
- Chrome
- Firefox
- Edge
- Safari (optional but appreciated)
Notes for Maintainer
Inline JS handles auto-focus, backspace, paste, and arrow key navigation. Press Enter after filling all 6 boxes to trigger success (code "123456") or error (any other code). Uses inputmode="numeric" and autocomplete="one-time-code" for mobile UX.

Closes #1200

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

✅ Submission Validation Passed!

Great job! All required files are present.

📁 Folder: submissions/examples/otp-input

Files found:

  • demo.html
  • style.css
  • README.md

🚀 Next Steps:

  • The maintainer will review your PR
  • Respond to any feedback if requested
  • Once approved, your contribution will be merged!

Thank you for contributing to EaseMotion CSS! 🎉

@Pcmhacker-piro
Copy link
Copy Markdown
Author

heyy @SAPTARSHI-coder
i fixed the assigned issue so pls check thsi

@SAPTARSHI-coder SAPTARSHI-coder added accepted Contribution approved for integration into EaseMotion CSS animation Animation effects, hover interactions, motion ideas, transitions component New UI components (buttons, cards, modals, tooltips, badges) enhancement New feature or request good first issue Good for newcomers GSSoC-26 Official GSSoC 2026 issue gssoc:approved Approved for GSSoC contributions integrated Successfully merged and included in the framework level:intermediate Requires moderate project understanding type:feature New functionality or enhancement labels Jun 4, 2026
@SAPTARSHI-coder SAPTARSHI-coder merged commit 24b3af6 into SAPTARSHI-coder:main Jun 4, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted Contribution approved for integration into EaseMotion CSS animation Animation effects, hover interactions, motion ideas, transitions component New UI components (buttons, cards, modals, tooltips, badges) contribution enhancement New feature or request good first issue Good for newcomers gssoc:approved Approved for GSSoC contributions GSSoC-26 Official GSSoC 2026 issue integrated Successfully merged and included in the framework level:intermediate Requires moderate project understanding type:feature New functionality or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

## Feature: Add ease-otp-input — One-Time Password Input with Animated Transitions

2 participants