About
OTP field that seals itself: digits roll in, a light scans the row, then the cells fuse into a verified seal. Type or paste. SMS fill, resend timer and error recovery in the full version: codeandchill.store/components/sigil?utm_source=21st
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Sigil OTP Field to your project and fits it to your theme.
Code
How Sigil OTP Field is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { useEffect, useState } from "react";
import SigilOtpField from "@/components/ui/sigil-otp-field";
const settings = {
length: 4,
demoCode: "4190",
destination: "+1 415 ••• 0142",
};
/** Opens dark (Sigil's own look), then follows the page's `dark` class only when it changes. */
function usePageDark() {
const [dark, setDark] = useState(true);
useEffect(() => {
const html = document.documentElement;
let last = html.classList.contains("dark");
const mo = new MutationObserver(() => {
const now = html.classList.contains("dark");
if (now !== last) { last = now; setDark(now); }
});
mo.observe(html, { attributes: true, attributeFilter: ["class"] });
return () => mo.disconnect();
}, []);
return dark;
}
export default function Demo(props: Partial<typeof settings> = {}) {
const s = { ...settings, ...props };
const dark = usePageDark();
return (
<div
className="flex min-h-[100dvh] w-full items-center justify-center overflow-x-hidden px-5 py-10"
style={{
background: dark
? "radial-gradient(78% 46% at 50% 8%, rgba(139,92,246,0.16), transparent 68%), radial-gradient(96% 60% at 50% 112%, rgba(31,224,200,0.07), transparent 64%), linear-gradient(180deg, #0b0e1a, #06070d 62%)"
: "radial-gradient(78% 46% at 50% 8%, rgba(139,92,246,0.14), transparent 68%), radial-gradient(96% 60% at 50% 112%, rgba(16,179,160,0.08), transparent 64%), linear-gradient(180deg, #f3f2fb, #e9ebf5 62%)",
}}
>
<SigilOtpField
length={s.length === 6 ? 6 : 4}
demoCode={s.demoCode}
destination={s.destination}
theme={dark ? "dark" : "light"}
/>
</div>
);
}
















![Form [react-aria-components]](https://cdn.21st.dev/cdn-cgi/image/fit=scale-down,width=640,quality=75,format=webp/https://cdn.21st.dev/user_jolbol1/field/814/preview.png)