# ShippingEstimate

> "What will shipping cost?" on a cart page: a GET form taking a postcode, then each way the order could travel with its arrival date and price.

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

Renders the heading, the one-field form and, once a postcode is answered, the options as a
list with the price end-aligned in tabular figures.

## Examples

```tsx
<ShippingEstimate action="/cart" value="SW1A 1AA" options={[{ id: "std", label: "Standard", arrives: "Arrives Tue 24 Nov", price: "£4.95" }]} labels={{ field: "Postcode", submit: "Estimate", heading: "Estimate shipping" }} />
```

## Props

| Prop | Type | Description |
| --- | --- | --- |
| `action` | `string` | The page the form reads back, usually the cart itself. |
| `name?` | `string` |  |
| `value?` | `string` | The postcode the options answer. |
| `error?` | `RemixNode` | Why the postcode gave no options; the field is marked invalid and described by it. |
| `fields?` | `Record<string, string>` | Hidden fields the query keeps, such as the country. |
| `options?` | `Option[]` |  |
| `labels` | `Labels` |  |

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

