# SMS Code

> SMS Code for Two-Factor Setup.

A shadcn/ui block from the [@flx](https://ui.flexnative.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/flx/two-factor-setup-2).

- Page, with a live preview: https://shadcn.exchange/r/flx/two-factor-setup-2
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/flx/two-factor-setup-2-light-af024fda1fe0dcac.png
- Registry item: https://ui.flexnative.com/r/two-factor-setup-2.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.flexnative.com/r/two-factor-setup-2.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- npm packages: `lucide-react`
- Registry items: `button`, `card`, `input`, `label`

## Files

### `registry/intents/auth/two-factor-setup/two-factor-setup-2.tsx`

```tsx
import { SmartphoneIcon } from 'lucide-react'

import { Button } from '@/components/ui/button'
import {
  Card,
  CardContent,
  CardFooter,
  CardHeader,
  CardTitle,
} from '@/components/ui/card'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'

export function TwoFactorSetup2() {
  return (
    <Card size="sm">
      <CardHeader>
        <div className="bg-primary/10 mb-1 flex size-10 items-center justify-center rounded-full">
          <SmartphoneIcon className="text-primary size-5" />
        </div>
        <CardTitle>Verify by SMS</CardTitle>
        <p className="text-muted-foreground text-xs">
          We&apos;ll text a code to your phone each time you sign in. Add the
          number to protect.
        </p>
      </CardHeader>

      <CardContent className="flex flex-col gap-1.5">
        <Label htmlFor="tf-phone" className="text-xs">
          Phone number
        </Label>
        <Input
          id="tf-phone"
          type="tel"
          placeholder="+1 (555) 000-0000"
          autoComplete="tel"
        />
      </CardContent>

      <CardFooter className="flex-col items-stretch gap-4">
        <Button className="w-full">Send code</Button>
        <p className="text-muted-foreground/80 text-center text-[11px]">
          Carrier rates may apply. SMS is less secure than an app.
        </p>
      </CardFooter>
    </Card>
  )
}
```
