# With select

> Sort dropdown paired with a direction-toggle icon button in a merged-border row.

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

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

## Install

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

## Files

### `registry/patterns/button/button-26.tsx`

```tsx
import { ArrowDownUpIcon } from 'lucide-react'

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

export function Button26() {
  return (
    <ButtonGroup>
      <Select defaultValue="newest">
        <SelectTrigger>
          <SelectValue />
        </SelectTrigger>
        <SelectContent>
          <SelectGroup>
            <SelectItem value="newest">Newest</SelectItem>
            <SelectItem value="oldest">Oldest</SelectItem>
            <SelectItem value="popular">Most popular</SelectItem>
            <SelectItem value="price-asc">Price: low to high</SelectItem>
          </SelectGroup>
        </SelectContent>
      </Select>
      <Button variant="outline" aria-label="Toggle sort direction">
        <ArrowDownUpIcon />
      </Button>
    </ButtonGroup>
  )
}
```
