# File input (UI SDK): Right to left

> Rows and the drop zone mirror, file names keep their own direction, and sizes format in the locale you pass.

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

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

## Add this example

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

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

## Source

```tsx title="components/examples/ui-sdk-file-input/rtl.tsx"
"use client"

import {
  FileInput,
  FileInputDropzone,
  FileInputDropzoneDescription,
  FileInputDropzoneIcon,
  FileInputDropzoneTitle,
  FileInputItem,
  FileInputItemContent,
  FileInputItemName,
  FileInputItemPreview,
  FileInputItemRemove,
  FileInputItemSize,
  FileInputList,
  FileInputTrigger,
} from "@/components/ui/ui-sdk-file-input"

function UiSdkFileInputRtl() {
  return (
    <div dir="rtl" className="w-full max-w-md">
      <FileInput multiple accept="image/*">
        <FileInputDropzone className="min-h-32">
          <FileInputDropzoneIcon />
          <FileInputDropzoneTitle>أفلت الصور هنا</FileInputDropzoneTitle>
          <FileInputDropzoneDescription>
            أو الصقها من الحافظة.
          </FileInputDropzoneDescription>
          <FileInputTrigger className="mt-3">تصفح الملفات</FileInputTrigger>
        </FileInputDropzone>
        <FileInputList aria-label="الصور">
          <FileInputItem>
            {({ file }) => (
              <>
                <FileInputItemPreview />
                <FileInputItemContent>
                  <FileInputItemName />
                  <FileInputItemSize locale="ar" />
                </FileInputItemContent>
                <FileInputItemRemove aria-label={`إزالة ${file.name}`} />
              </>
            )}
          </FileInputItem>
        </FileInputList>
      </FileInput>
    </div>
  )
}

export { UiSdkFileInputRtl }
```

## Props in this example

### FileInput

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `accept` | `string \| string[]` | – |  |
| `multiple` | `boolean` | `false` |  |

### FileInputItemSize

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `locale` | `string` | – | Formats the size, like 2.4 kB, in this locale. Defaults to the browser’s. |

## More File input examples

- [Accepted types and limits](https://hextaui.com/docs/ui-sdk-file-input/examples/limits)
- [Image previews](https://hextaui.com/docs/ui-sdk-file-input/examples/images)
- [Upload button](https://hextaui.com/docs/ui-sdk-file-input/examples/button)
- [Prompt attachments](https://hextaui.com/docs/ui-sdk-file-input/examples/attachments)
- [Page-wide drop](https://hextaui.com/docs/ui-sdk-file-input/examples/page-drop)
- [Folders](https://hextaui.com/docs/ui-sdk-file-input/examples/folders)
- [Controlled](https://hextaui.com/docs/ui-sdk-file-input/examples/controlled)
- [Form](https://hextaui.com/docs/ui-sdk-file-input/examples/form)
- [Invalid](https://hextaui.com/docs/ui-sdk-file-input/examples/invalid)
- [Disabled](https://hextaui.com/docs/ui-sdk-file-input/examples/disabled)
