Skip to main content

Web Components

Web components are a set of web platform APIs that allow you to create new custom, reusable, encapsulated HTML tags to use in web pages and web apps. Custom components and widgets build on the Web Component standards, will work across modern browsers, and can be used with any JavaScript library or framework that works with HTML.

Web3Modal utilizes Web Components to provide a set of customizable HTML elements that work as its building blocks.

info

Web components are global html elements that don't require importing.

List of optional properties for Web3Modal web components​

<w3m-button />​

VariableDescriptionType
disabledEnable or disable the button.boolean
balanceShow or hide the user's balance.'show' or 'hide'
sizeDefault size for the button.'md' or 'sm'
labelThe text shown in the button.string
loadingLabelThe text shown in the button when the modal is open.string

<w3m-account-button />​

VariableDescriptionType
disabledEnable or disable the button.boolean
balanceShow or hide the user's balance.'show' or 'hide'

<w3m-connect-button />​

VariableDescriptionType
sizeDefault size for the button.'md' or 'sm'
labelThe text shown in the button.string
loadingLabelThe text shown in the button when the modal is open.string

<w3m-network-button />​

VariableDescriptionType
disabledEnable or disable the button.boolean