light mode
State New York Alabama Alaska American Samoa Arizona Arkansas California Colorado Connecticut Delaware District of Columbia Micronesia Florida Georgia Guam Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Marshall Islands Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nebraska Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota Northern Mariana Islands Ohio Oklahoma Oregon Palau Pennsylvania Puerto Rico Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virgin Islands Virginia Washington West Virginia Wisconsin Wyoming Armed Forces Americas Armed Forces Europe, Canada, Africa and Middle East Armed Forces Pacific
Province or territory Pick one Thirteen of them, searched by name or short code. Pick one Alberta British Columbia Manitoba New Brunswick Newfoundland and Labrador Northwest Territories Nova Scotia Nunavut Ontario Prince Edward Island Quebec Saskatchewan Yukon
Council area Pick one Pick one Aberdeen City Aberdeenshire Angus Antrim and Newtownabbey Ards and North Down Argyll and Bute Armagh City, Banbridge and Craigavon Barking and Dagenham Barnet Barnsley Bath and North East Somerset Bedford Belfast City Berkshire Bexley Birmingham Blackburn with Darwen Blackpool Blaenau Gwent Bolton Bournemouth, Christchurch and Poole Bracknell Forest Bradford Brent Bridgend Brighton and Hove Bristol, City of Bromley Buckinghamshire Bury Caerphilly Calderdale Cambridgeshire Camden Cardiff Carmarthenshire Causeway Coast and Glens Central Bedfordshire Ceredigion Cheshire East Cheshire West and Chester Clackmannanshire Conwy Cornwall Coventry Croydon Cumbria Darlington Denbighshire Derby Derbyshire Derry and Strabane Devon Doncaster Dorset Dudley Dumfries and Galloway Dundee City Durham, County Ealing East Ayrshire East Dunbartonshire East Lothian East Renfrewshire East Riding of Yorkshire East Sussex Edinburgh, City of Eilean Siar Enfield Essex Falkirk Fermanagh and Omagh Fife Flintshire Gateshead Glasgow City Gloucestershire Greenwich Gwynedd Hackney Halton Hammersmith and Fulham Hampshire Haringey Harrow Hartlepool Havering Herefordshire Hertfordshire Highland Hillingdon Hounslow Inverclyde Isle of Anglesey Isle of Wight Isles of Scilly Islington Kensington and Chelsea Kent Kingston upon Hull Kingston upon Thames Kirklees Knowsley Lambeth Lancashire Leeds Leicester Leicestershire Lewisham Lincolnshire Lisburn and Castlereagh Liverpool London Luton Manchester Medway Merthyr Tydfil Merton Mid and East Antrim Mid-Ulster Middlesbrough Midlothian Milton Keynes Monmouthshire Moray Neath Port Talbot Newcastle upon Tyne Newham Newport Newry, Mourne and Down Norfolk North Ayrshire North East Lincolnshire North Lanarkshire North Lincolnshire North Somerset North Tyneside North Yorkshire Northamptonshire Northumberland Nottingham Nottinghamshire Oldham Orkney Islands Oxfordshire Pembrokeshire Perth and Kinross Peterborough Plymouth Portsmouth Powys Reading Redbridge Redcar and Cleveland Renfrewshire Rhondda Cynon Taff Richmond upon Thames Rochdale Rotherham Rutland Salford Sandwell Scottish Borders Sefton Sheffield Shetland Islands Shropshire Slough Solihull Somerset South Ayrshire South Gloucestershire South Lanarkshire South Tyneside Southampton Southend-on-Sea Southwark St. Helens Staffordshire Stirling Stockport Stockton-on-Tees Stoke-on-Trent Suffolk Sunderland Surrey Sutton Swansea Swindon Tameside Telford and Wrekin Thurrock Torbay Torfaen Tower Hamlets Trafford Vale of Glamorgan, The Wakefield Walsall Waltham Forest Wandsworth Warrington Warwickshire West Berkshire West Dunbartonshire West Lothian West Sussex Westminster Wigan Wiltshire Windsor and Maidenhead Wirral Wokingham Wolverhampton Worcestershire Wrexham York
With no country there is nothing to open
Province Pick a country first Pick a country first
State We do not ship to that state Alabama Alaska American Samoa Arizona Arkansas California Colorado Connecticut Delaware District of Columbia Micronesia Florida Georgia Guam Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Marshall Islands Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nebraska Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota Northern Mariana Islands Ohio Oklahoma Oregon Palau Pennsylvania Puerto Rico Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virgin Islands Virginia Washington West Virginia Wisconsin Wyoming Armed Forces Americas Armed Forces Europe, Canada, Africa and Middle East Armed Forces Pacific
Sizes
Small Small Alberta British Columbia Manitoba New Brunswick Newfoundland and Labrador Northwest Territories Nova Scotia Nunavut Ontario Prince Edward Island Quebec Saskatchewan Yukon
Default Default Alberta British Columbia Manitoba New Brunswick Newfoundland and Labrador Northwest Territories Nova Scotia Nunavut Ontario Prince Edward Island Quebec Saskatchewan Yukon
Large Large Alberta British Columbia Manitoba New Brunswick Newfoundland and Labrador Northwest Territories Nova Scotia Nunavut Ontario Prince Edward Island Quebec Saskatchewan Yukon
dark mode
State New York Alabama Alaska American Samoa Arizona Arkansas California Colorado Connecticut Delaware District of Columbia Micronesia Florida Georgia Guam Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Marshall Islands Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nebraska Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota Northern Mariana Islands Ohio Oklahoma Oregon Palau Pennsylvania Puerto Rico Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virgin Islands Virginia Washington West Virginia Wisconsin Wyoming Armed Forces Americas Armed Forces Europe, Canada, Africa and Middle East Armed Forces Pacific
Province or territory Pick one Thirteen of them, searched by name or short code. Pick one Alberta British Columbia Manitoba New Brunswick Newfoundland and Labrador Northwest Territories Nova Scotia Nunavut Ontario Prince Edward Island Quebec Saskatchewan Yukon
Council area Pick one Pick one Aberdeen City Aberdeenshire Angus Antrim and Newtownabbey Ards and North Down Argyll and Bute Armagh City, Banbridge and Craigavon Barking and Dagenham Barnet Barnsley Bath and North East Somerset Bedford Belfast City Berkshire Bexley Birmingham Blackburn with Darwen Blackpool Blaenau Gwent Bolton Bournemouth, Christchurch and Poole Bracknell Forest Bradford Brent Bridgend Brighton and Hove Bristol, City of Bromley Buckinghamshire Bury Caerphilly Calderdale Cambridgeshire Camden Cardiff Carmarthenshire Causeway Coast and Glens Central Bedfordshire Ceredigion Cheshire East Cheshire West and Chester Clackmannanshire Conwy Cornwall Coventry Croydon Cumbria Darlington Denbighshire Derby Derbyshire Derry and Strabane Devon Doncaster Dorset Dudley Dumfries and Galloway Dundee City Durham, County Ealing East Ayrshire East Dunbartonshire East Lothian East Renfrewshire East Riding of Yorkshire East Sussex Edinburgh, City of Eilean Siar Enfield Essex Falkirk Fermanagh and Omagh Fife Flintshire Gateshead Glasgow City Gloucestershire Greenwich Gwynedd Hackney Halton Hammersmith and Fulham Hampshire Haringey Harrow Hartlepool Havering Herefordshire Hertfordshire Highland Hillingdon Hounslow Inverclyde Isle of Anglesey Isle of Wight Isles of Scilly Islington Kensington and Chelsea Kent Kingston upon Hull Kingston upon Thames Kirklees Knowsley Lambeth Lancashire Leeds Leicester Leicestershire Lewisham Lincolnshire Lisburn and Castlereagh Liverpool London Luton Manchester Medway Merthyr Tydfil Merton Mid and East Antrim Mid-Ulster Middlesbrough Midlothian Milton Keynes Monmouthshire Moray Neath Port Talbot Newcastle upon Tyne Newham Newport Newry, Mourne and Down Norfolk North Ayrshire North East Lincolnshire North Lanarkshire North Lincolnshire North Somerset North Tyneside North Yorkshire Northamptonshire Northumberland Nottingham Nottinghamshire Oldham Orkney Islands Oxfordshire Pembrokeshire Perth and Kinross Peterborough Plymouth Portsmouth Powys Reading Redbridge Redcar and Cleveland Renfrewshire Rhondda Cynon Taff Richmond upon Thames Rochdale Rotherham Rutland Salford Sandwell Scottish Borders Sefton Sheffield Shetland Islands Shropshire Slough Solihull Somerset South Ayrshire South Gloucestershire South Lanarkshire South Tyneside Southampton Southend-on-Sea Southwark St. Helens Staffordshire Stirling Stockport Stockton-on-Tees Stoke-on-Trent Suffolk Sunderland Surrey Sutton Swansea Swindon Tameside Telford and Wrekin Thurrock Torbay Torfaen Tower Hamlets Trafford Vale of Glamorgan, The Wakefield Walsall Waltham Forest Wandsworth Warrington Warwickshire West Berkshire West Dunbartonshire West Lothian West Sussex Westminster Wigan Wiltshire Windsor and Maidenhead Wirral Wokingham Wolverhampton Worcestershire Wrexham York
With no country there is nothing to open
Province Pick a country first Pick a country first
State We do not ship to that state Alabama Alaska American Samoa Arizona Arkansas California Colorado Connecticut Delaware District of Columbia Micronesia Florida Georgia Guam Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Marshall Islands Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nebraska Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota Northern Mariana Islands Ohio Oklahoma Oregon Palau Pennsylvania Puerto Rico Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virgin Islands Virginia Washington West Virginia Wisconsin Wyoming Armed Forces Americas Armed Forces Europe, Canada, Africa and Middle East Armed Forces Pacific
Sizes
Small Small Alberta British Columbia Manitoba New Brunswick Newfoundland and Labrador Northwest Territories Nova Scotia Nunavut Ontario Prince Edward Island Quebec Saskatchewan Yukon
Default Default Alberta British Columbia Manitoba New Brunswick Newfoundland and Labrador Northwest Territories Nova Scotia Nunavut Ontario Prince Edward Island Quebec Saskatchewan Yukon
Large Large Alberta British Columbia Manitoba New Brunswick Newfoundland and Labrador Northwest Territories Nova Scotia Nunavut Ontario Prince Edward Island Quebec Saskatchewan Yukon
Region what it is : the same, over one country's subdivisions
its own props : value, country
example : country
From the Composites section of @aweftjs/ui .
Example Every state, type and size, rendered in light and dark from recipes/ui/examples/region.example.tsx :
// Region: the subdivisions of one country, in the same dialog with the same search (design 251).
//
// A page of its own because it is a field of its own: an address form that already knows the country
// asks for the province and nothing else. The pair driven together is on the Country page.
import { mutable } from '@aweftjs/core' ;
import { Countries, Region, h } from '@aweftjs/ui' ;
import { countryData } from '@aweftjs/ui/countries' ;
import { ids } from '../example.ts' ;
import type { ExampleComponent } from '../example.ts' ;
const data = await countryData();
export const name = 'Region' ;
export const order = 19 ;
export const Example: ExampleComponent = (props) => {
const at = ids(props.mode);
const state = mutable<unknown > ('NY' );
const province = mutable<unknown > (null );
const council = mutable<unknown > (null );
return (
<Countries value={data}>
<div theme="column" >
<Region id={at('region-us' )} label="State" value={state} country="US" name="state" />
<Region
id={at('region-ca' )}
label="Province or territory"
value={province}
country="CA"
placeholder="Pick one"
description="Thirteen of them, searched by name or short code."
/>
{/* The longest subdivision list the data has: 217 rows, which is the case a dropdown
cannot serve and the reason this field is the searched dialog (design 251). */ }
<Region
id={at('region-gb' )}
label="Council area"
value={council}
country="GB"
placeholder="Pick one"
/>
<p theme={['text' , 'sm' , 'muted' ]}> With no country there is nothing to open</p >
<Region id={at('region-none' )} label="Province" placeholder="Pick a country first" />
<Region
id={at('region-error' )}
label="State"
country="US"
error="We do not ship to that state"
/>
<p theme={['text' , 'sm' , 'muted' ]}> Sizes</p >
<Region id={at('region-sm' )} aria-label="Small region" country="CA" size="sm" placeholder="Small" />
<Region id={at('region-md' )} aria-label="Default region" country="CA" placeholder="Default" />
<Region id={at('region-lg' )} aria-label="Large region" country="CA" size="lg" placeholder="Large" />
</div >
</Countries >
);
};Previous Radio Next Select