UNPKG

@arolariu/components

Version:

🎨 70+ beautiful, accessible React components built on Base UI. TypeScript-first, CSS Modules styling, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡

93 lines (78 loc) • 1.72 kB
.container { display: flex; align-items: center; gap: var(--ac-space-2); } .container:has(:disabled) { opacity: 0.5; } .input:disabled { cursor: not-allowed; } .group { display: flex; align-items: center; } .slot { position: relative; display: flex; width: 2.25rem; height: 2.25rem; align-items: center; justify-content: center; border-block: 1px solid var(--ac-border); border-right: 1px solid var(--ac-border); background-color: var(--ac-background); color: var(--ac-foreground); box-shadow: 0 1px 2px rgb(0 0 0 / 0.05); font-size: var(--ac-text-sm); transition: box-shadow var(--ac-transition-fast), border-color var(--ac-transition-fast); } .slot:first-child { border-left: 1px solid var(--ac-border); border-top-left-radius: var(--ac-radius-md); border-bottom-left-radius: var(--ac-radius-md); } .slot:last-child { border-top-right-radius: var(--ac-radius-md); border-bottom-right-radius: var(--ac-radius-md); } .slotActive { z-index: 1; box-shadow: 0 0 0 1px var(--ac-ring); } .fakeCaretContainer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; } .fakeCaret { width: 1px; height: 1rem; background-color: var(--ac-foreground); animation: input-otp-caret-blink 1s ease-out infinite; } .separator { display: flex; align-items: center; justify-content: center; color: var(--ac-muted-foreground); } .separatorIcon { width: 1rem; height: 1rem; } @keyframes input-otp-caret-blink { 0%, 70%, 100% { opacity: 1; } 20%, 50% { opacity: 0; } }