Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/quietgarden/elm-web3-ui is gone (deleted or private); Software Heritage not asked yet (this run's --swh-calls were used up); no fork with tag 2.0.0 found (1 same-name repos checked); no cached copy. Use another version.
Address display and input components.
-- Display with optional explorer link:
Web3.Ui.Address.view []
{ explorerUrl = Just "https://etherscan.io/address/" }
addr
-- Truncated address string (pure, no Html):
Web3.Ui.Address.short addr --> "0x1234…abcd"
-- Truncated with custom lengths (e.g. token detail page):
Web3.Ui.Address.shortWith { prefixChars = 8, suffixChars = 6 } addr
--> "0x123456…789abc"
-- Address text input:
Web3.Ui.Address.input []
{ value = model.addressInput
, onInput = AddressInputChanged
, valid = True
}Truncate an address to "0x" + first 4 hex chars + "…" + last 4 hex chars.
short addr --> "0x1234…abcd"Truncate an address with configurable prefix and suffix lengths.
prefixChars is the total number of leading characters including "0x".
suffixChars is the number of trailing hex characters.
shortWith { prefixChars = 6, suffixChars = 4 } addr
--> "0x1234…abcd" (same as short)
shortWith { prefixChars = 8, suffixChars = 6 } addr
--> "0x123456…789abc"A text input for address entry. Adds web3-input-address--invalid class
when valid is False.
The host app is responsible for validating with T.address.
CSS class: web3-input-address (plus web3-input-address--invalid when invalid)
Display an address as "0x1234…abcd". Optionally wraps in an
<a>tag whenexplorerUrlisJust url.CSS class:
web3-address