# Password input (UI SDK): Right to left

> The toggle sits on the left, and the strength meter fills from the right. Pass labels in your language.

Canonical: https://hextaui.com/docs/ui-sdk-password-input/examples/rtl

Component docs: https://hextaui.com/docs/ui-sdk-password-input

## Add this example

```bash
npx shadcn@latest add https://hextaui.com/r/ui-sdk-password-input-rtl.json
```

This adds `components/examples/ui-sdk-password-input/rtl.tsx` with the Password input component and the HextaUI theme tokens.

## Source

```tsx title="components/examples/ui-sdk-password-input/rtl.tsx"
import { Label } from "@/components/ui/label"
import {
  PasswordInput,
  PasswordInputCapsLock,
  PasswordInputControl,
  PasswordInputGroup,
  PasswordInputStrength,
  PasswordInputToggle,
} from "@/components/ui/ui-sdk-password-input"

function UiSdkPasswordInputRtl() {
  return (
    <div dir="rtl" className="flex w-full max-w-64 flex-col gap-2">
      <Label htmlFor="rtl-password">كلمة المرور</Label>
      <PasswordInput autoComplete="new-password">
        <PasswordInputGroup>
          <PasswordInputControl id="rtl-password" />
          <PasswordInputToggle aria-label="إظهار كلمة المرور" />
        </PasswordInputGroup>
        <PasswordInputCapsLock>مفتاح الأحرف الكبيرة مفعّل</PasswordInputCapsLock>
        <PasswordInputStrength
          label="قوة كلمة المرور"
          labels={["", "ضعيفة", "مقبولة", "جيدة", "قوية"]}
        />
      </PasswordInput>
    </div>
  )
}

export { UiSdkPasswordInputRtl }
```

## Props in this example

### PasswordInput

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `autoComplete` | `"current-password" \| "new-password" \| "off" \| string` | `"current-password"` |  |

### PasswordInputControl

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` | `string` | – |  |

### PasswordInputToggle

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `aria-label` | `string` | `"Show password"` |  |

### PasswordInputStrength

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `labels` | `[string, string, string, string, string]` | `["", "Weak", "Fair", "Good", "Strong"]` |  |
| `label` | `string` | `"Password strength"` |  |

## More Password input examples

- [New password](https://hextaui.com/docs/ui-sdk-password-input/examples/new-password)
- [Sign in](https://hextaui.com/docs/ui-sdk-password-input/examples/sign-in)
- [Shown at first](https://hextaui.com/docs/ui-sdk-password-input/examples/visible)
- [Suggest a password](https://hextaui.com/docs/ui-sdk-password-input/examples/controller)
- [Controlled visibility](https://hextaui.com/docs/ui-sdk-password-input/examples/controlled)
- [Invalid](https://hextaui.com/docs/ui-sdk-password-input/examples/invalid)
- [Read-only](https://hextaui.com/docs/ui-sdk-password-input/examples/read-only)
- [Disabled](https://hextaui.com/docs/ui-sdk-password-input/examples/disabled)
