# SortSelect

> The order a product listing is sorted in, as a labelled native select that submits its form the moment the shopper picks an order.

```ts
import { SortSelect } from "@sdxc/ui/commerce";
```

Renders the label and select in a row, with a submit button that hides once script runs.

## Examples

```tsx
<SortSelect form="filters" name="sort" value="new" label="Sort by" options={[{ value: "new", label: "Newest" }, { value: "price", label: "Price: low to high" }]} />
```

## Props

| Prop | Type | Description |
| --- | --- | --- |
| `name` | `string` | The query field the order submits as, such as "sort". |
| `value` | `string` | The order selected now. |
| `options` | `Option[]` |  |
| `label` | `string` | The visible label, such as "Sort by". |
| `form?` | `string` | The id of the form the select belongs to, when it sits outside that form. |
| `submitLabel?` | `string` | The button that submits without script. @default "Apply" |

Also accepts everything in `Omit<TagProps<"div">, "children">`.

