# Token input (UI SDK): Read-only

> With `readOnly`, the text stays focusable, selectable and submitted, but typing, pastes and drops leave it alone.

Canonical: https://hextaui.com/docs/ui-sdk-token-input/examples/read-only

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

## Add this example

```bash
npx shadcn@latest add https://hextaui.com/r/ui-sdk-token-input-read-only.json
```

This adds `components/examples/ui-sdk-token-input/read-only.tsx` with the Token input component and the HextaUI theme tokens.

## Source

```tsx title="components/examples/ui-sdk-token-input/read-only.tsx"
import {
  TokenInput,
  TokenInputEditor,
  type TokenInputValue,
} from "@/components/ui/ui-sdk-token-input"

const draft: TokenInputValue = [
  "Summarize ",
  { type: "file", value: "README.md", label: "README.md" },
  " for the release notes.",
]

function UiSdkTokenInputReadOnly() {
  return (
    <div className="w-full max-w-md">
      <TokenInput readOnly defaultValue={draft}>
        <TokenInputEditor aria-label="Prompt" />
      </TokenInput>
    </div>
  )
}

export { UiSdkTokenInputReadOnly }
```

## Props in this example

### TokenInput

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultValue` | `TokenInputValue` | – |  |
| `readOnly` | `boolean` | `false` |  |

## More Token input examples

- [Prompt](https://hextaui.com/docs/ui-sdk-token-input/examples/prompt)
- [Deleting tokens](https://hextaui.com/docs/ui-sdk-token-input/examples/deletion)
- [Controller](https://hextaui.com/docs/ui-sdk-token-input/examples/controller)
- [Form](https://hextaui.com/docs/ui-sdk-token-input/examples/form)
- [Submit shortcut](https://hextaui.com/docs/ui-sdk-token-input/examples/submit-shortcut)
- [Custom codec](https://hextaui.com/docs/ui-sdk-token-input/examples/codec)
- [Disabled](https://hextaui.com/docs/ui-sdk-token-input/examples/disabled)
- [Right to left](https://hextaui.com/docs/ui-sdk-token-input/examples/rtl)
