Skip to main content

Address

<sc-address></sc-address>

This component let users add address.

Component Codex

Properties

PropertyDescriptionTypeDefault
addressThe address.{ name?: string; line_1?: string; line_2?: string; city?: string; state?: string; postal_code?: string; country?: string; constructor?: Function; toString?: () => string; toLocaleString?: () => string; valueOf?: () => Object; hasOwnProperty?: (v: PropertyKey) => boolean; isPrototypeOf?: (v: Object) => boolean; propertyIsEnumerable?: (v: PropertyKey) => boolean; }{ country: null, city: null, line_1: null, line_2: null, postal_code: null, state: null, }
disabledIs this disabled?boolean
labelThe label for the field.string
loadingIs this loading?booleanfalse
names{ name?: string; line_1?: string; line_2?: string; city?: string; state?: string; postal_code?: string; country?: string; constructor?: Function; toString?: () => string; toLocaleString?: () => string; valueOf?: () => Object; hasOwnProperty?: (v: PropertyKey) => boolean; isPrototypeOf?: (v: Object) => boolean; propertyIsEnumerable?: (v: PropertyKey) => boolean; }{ name: 'shipping_name', country: 'shipping_country', city: 'shipping_city', line_1: 'shipping_line_1', line_2: 'shipping_line_2', postal_code: 'shipping_postal_code', state: 'shipping_state', }
placeholders{ name?: string; line_1?: string; line_2?: string; city?: string; state?: string; postal_code?: string; country?: string; constructor?: Function; toString?: () => string; toLocaleString?: () => string; valueOf?: () => Object; hasOwnProperty?: (v: PropertyKey) => boolean; isPrototypeOf?: (v: Object) => boolean; propertyIsEnumerable?: (v: PropertyKey) => boolean; }{}
requireNameIs the name requiredbooleanfalse
requiredIs this required?booleanfalse
showLine2Should we show name field?boolean
showNameShould we show name field?boolean

Events

EventDescriptionType
scChangeAddressAddress change event.CustomEvent<{ name?: string; line_1?: string; line_2?: string; city?: string; state?: string; postal_code?: string; country?: string; constructor?: Function; toString?: () => string; toLocaleString?: () => string; valueOf?: () => Object; hasOwnProperty?: (v: PropertyKey) => boolean; isPrototypeOf?: (v: Object) => boolean; propertyIsEnumerable?: (v: PropertyKey) => boolean; }>
scInputAddressAddress change event.CustomEvent<{ name?: string; line_1?: string; line_2?: string; city?: string; state?: string; postal_code?: string; country?: string; constructor?: Function; toString?: () => string; toLocaleString?: () => string; valueOf?: () => Object; hasOwnProperty?: (v: PropertyKey) => boolean; isPrototypeOf?: (v: Object) => boolean; propertyIsEnumerable?: (v: PropertyKey) => boolean; }>

Methods

reportValidity() => Promise<boolean>

Shadow Parts

PartDescription
baseThe elements base wrapper.
block-uiThe block ui base component.
block-ui__contentThe block ui content (spinner).
caretThe select box caret.
columns
emptyThe select empty message.
form-controlThe form control wrapper.
help-textHelp text that describes how to use the input.
inputThe html input element.
input__baseThe inputs base element.
labelThe input label.
menu__baseThe select menu base.
name__input
panelThe select box panel.
search__baseThe select search base.
search__form-controlThe select search form control.
search__inputThe select search input.
select__baseThe select boxes base element.
spinner__baseThe select spinner base.
triggerThe select box trigger.