---
doc_layout: component
component: c-lb.otp
title: OTP
description: "OTP component for Django: a one-time-passcode input for 2FA, login codes, and verification flows. Built with django-cotton, Tailwind CSS, and daisyUI 5."
keywords: "django otp component, one time password django, 2fa input django, verification code django, daisyui otp django, tailwind otp django, otp django-cotton, django-cotton"
daisy_ui_component_name: otp
icon: rmx.lock-password
---

OTP renders a one-time-passcode field: a single native input laid over fixed cells, so it stays keyboard- and paste-friendly while looking like separate boxes. Set the number of cells with `length`; `size`, `variant`, and `joined` follow the standard input styling.

## Basic OTP
<c-lbdocs.component_example path="otp/basic" />

## Sizes
<c-lbdocs.component_example path="otp/sizes" />

## Color Variants
<c-lbdocs.component_example path="otp/variants" />

## Joined
<c-lbdocs.component_example path="otp/joined" />

## API Reference
### `c-lb.otp`
<c-lbdocs.api_table component_name="otp" />
