# Input group: Long content

> Long values scroll inside the input instead of stretching the group. Wrap long addon text in a truncating span with a max width.

Example: https://hextaui.com/docs/input-group/examples/long-content
Component docs: https://hextaui.com/docs/input-group.md

## Add this example

```bash
npx shadcn@latest add https://hextaui.com/r/input-group-long-content.json
```

This adds `components/examples/input-group/long-content.tsx` with the Input group component and the HextaUI theme tokens.

## Source

```tsx title="components/examples/input-group/long-content.tsx"
import { IconWorld } from "@tabler/icons-react"

import {
  InputGroup,
  InputGroupAddon,
  InputGroupInput,
  InputGroupText,
} from "@/components/ui/input-group"

export function InputGroupLongContent() {
  return (
    <div className="flex w-72 flex-col gap-4">
      <InputGroup>
        <InputGroupInput
          defaultValue="averyveryverylongunbrokenvaluethatkeepsgoingandgoing"
          aria-label="Value"
        />
        <InputGroupAddon>
          <IconWorld />
        </InputGroupAddon>
        <InputGroupAddon align="inline-end">
          <InputGroupText>.example.com</InputGroupText>
        </InputGroupAddon>
      </InputGroup>
      <InputGroup>
        <InputGroupInput placeholder="name" aria-label="Subdomain" />
        <InputGroupAddon>
          <InputGroupText className="max-w-28">
            <span className="truncate">
              https://workspace-with-a-long-name.
            </span>
          </InputGroupText>
        </InputGroupAddon>
      </InputGroup>
    </div>
  )
}
```

## Props in this example

### InputGroupAddon

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `align` | `"inline-start" \| "inline-end" \| "block-start" \| "block-end"` | `"inline-start"` |  |

## More Input group examples

- [Icon](https://hextaui.com/docs/input-group/examples/icon.md)
- [Clear](https://hextaui.com/docs/input-group/examples/clear.md)
- [Character count](https://hextaui.com/docs/input-group/examples/count.md)
- [Text](https://hextaui.com/docs/input-group/examples/text.md)
- [Button](https://hextaui.com/docs/input-group/examples/button.md)
- [Keyboard hint](https://hextaui.com/docs/input-group/examples/kbd.md)
- [Textarea](https://hextaui.com/docs/input-group/examples/textarea.md)
- [Header](https://hextaui.com/docs/input-group/examples/block-start.md)
- [Password](https://hextaui.com/docs/input-group/examples/password.md)
- [Sizes](https://hextaui.com/docs/input-group/examples/sizes.md)
- [Invalid](https://hextaui.com/docs/input-group/examples/invalid.md)
- [Disabled](https://hextaui.com/docs/input-group/examples/disabled.md)
- [Loading](https://hextaui.com/docs/input-group/examples/loading.md)
- [Dropdown](https://hextaui.com/docs/input-group/examples/dropdown.md)
- [Right to left](https://hextaui.com/docs/input-group/examples/rtl.md)
