Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Shipping Zones Settings Block for React

A shipping zones window with a rail of zones and, for the chosen one, country chips, weight bands whose start follows the band before, a free-shipping threshold and a basket test that prices a weight and a subtotal.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Set where a shop ships and what it charges, then test a basket before it goes live, with this shipping zones window for React with Base UI. It is a framed window of fixed height with its own top bar, whose one Shine Button saves every zone. A rail lists three zones (Domestic, Europe, Rest of world), each with its country count, band count and free-shipping line. Choosing a zone opens its pane: the countries as chips in a Tags Input (a country can be in one zone only, and a refused one says why), a native table of weight bands where each band starts where the one before it ends and has an end and a price in Number Input fields, with Add band and Remove (the last band only), a Switch for free shipping with its subtotal threshold, and Test a basket: a weight and a subtotal give "Shipping: 8.00 for 3 kg (band 2)" or "Free". A band that ends before it starts, or that costs less than the one before it, is a message on the pane and a refusal on save. The status line at the foot counts changed zones, beside a ghost Button to discard them. On a phone the rail and the pane are one screen at a time with a Back button. It's built from Tags Input, Number Input, Switch, Button, Shine Button and Guides, with a CSS entrance only. For shop platforms, delivery settings and any checkout that prices shipping by weight.

FAQ

How do I change the zones, the countries or the rates?

Edit SAVED: each zone has its countries (the Rest of world zone has none and means every other country), its bands (an end in kilograms and a price in whole pounds, as text), a free-shipping switch and a threshold. COUNTRIES is the list a chip can name. A band's start is never stored: it is the end of the band before it (0 for the first), so the bands cannot leave a gap.

What does it refuse?

A country that is not in the list or is already in another zone, a band that ends at or before its start, a band that costs less than the one before it, and a zone with no countries (Rest of world excepted). The pane shows the first band problem live, and Save names the zone and opens it with focus on its heading. Leaving a number field puts a whole number inside its range back in it.

How is the basket priced?

For the chosen zone: if free shipping is on and the subtotal is at or over the threshold, it is Free; otherwise the band whose range holds the weight (over its start, up to and including its end) gives the price; a weight no band covers says the zone cannot ship it. The numbers are whole kilograms and pounds, and the basket is not saved.

What stays local, and how do I wire it for real?

Everything: no carrier is called and nothing is charged. Save keeps the zones in this page and says so. To make it real, store the zones with the shop, resolve a shipping address to its zone on the server with the same rules, and price the basket there rather than in the browser.

How does it look on a phone, and by keyboard?

The window keeps its height and shows one pane at a time: the rail first, and choosing a zone opens its pane with focus on the zone's name, under a Back button that returns to the rail with focus on the row you left. The bands become cards, each field is named for its band, the chosen zone is marked as current, and the status line is a polite live region present from the start.

  • Pro

    A homeware shop's shipping dialog shown open: four delivery methods with arrival dates counted in business days from a fixed order date, prices in whole cents, a free-shipping bar and a button that names the choice.

  • Pro

    Access Token Hygiene Settings

    Sign-in and security

    An access token settings panel that flags risky tokens (no end date, unused for 90 days, the admin scope, ending soon), gives a token an end date from a menu, and revokes the ticked ones after an alert dialog lists them.

  • Pro

    Account Deletion Settings

    Backups and exports

    A whole-page account deletion that first asks what happens to each kind of data (delete, anonymise or transfer, with invoices locked for tax law), sums the choices in one sentence, then schedules deletion 14 days out behind a typed-email alert dialog.

  • Pro

    Alert Rules Settings

    Alerts and audit

    An alert rules panel where each rule is a sentence you edit in place with menus and a number field, beside a framed chart of its metric with the threshold line and a computed count of how often it would have fired.

  • Pro

    API Key Builder Settings

    API and webhooks

    An API key settings panel with a table of keys, a builder that sets None, Read or Write for each resource, and a try-a-request check that answers Allowed or Denied with the reason before anything is saved.

  • Pro

    A matrix of API limits with the plans across and a number field in every cell, a daily capacity worked out under each plan and a guard that stops a higher plan from allowing less than the plan before it.