# With currency select

> Nested ButtonGroup: currency Select, amount input, and submit icon button.

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

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

## Install

```bash
npx shadcn@latest add https://ui.flexnative.com/r/input-15.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: `input`, `button`, `button-group`, `select`

## Files

### `registry/patterns/input/input-15.tsx`

```tsx
'use client'

import { useState } from 'react'
import { ArrowRightIcon } from 'lucide-react'

import { Button } from '@/components/ui/button'
import { ButtonGroup } from '@/components/ui/button-group'
import { Input } from '@/components/ui/input'
import {
  Select,
  SelectContent,
  SelectGroup,
  SelectItem,
  SelectTrigger,
  SelectValue,
} from '@/components/ui/select'

const currencies = [
  { value: '$', label: 'US Dollar' },
  { value: '€', label: 'Euro' },
  { value: '£', label: 'British Pound' },
] as const

export function Input15() {
  const [currency, setCurrency] = useState<string>(currencies[0].value)

  return (
    <ButtonGroup className="max-w-sm">
      <ButtonGroup>
        <Select
          value={currency}
          onValueChange={(value) => setCurrency(value ?? '')}
        >
          <SelectTrigger>
            <SelectValue>{currency}</SelectValue>
          </SelectTrigger>
          <SelectContent>
            <SelectGroup>
              {currencies.map((item) => (
                <SelectItem key={item.value} value={item.value}>
                  {item.value}{' '}
                  <span className="text-muted-foreground">{item.label}</span>
                </SelectItem>
              ))}
            </SelectGroup>
          </SelectContent>
        </Select>
        <Input placeholder="10.00" inputMode="decimal" />
      </ButtonGroup>
      <ButtonGroup>
        <Button variant="outline" size="icon" aria-label="Submit amount">
          <ArrowRightIcon />
        </Button>
      </ButtonGroup>
    </ButtonGroup>
  )
}
```
