Web Components
Information about the upcoming Web Components auxiliary module for Dapp development.
<!DOCTYPE html>
<html>
<head>
<title>My shiny new Dapp</title>
<script type="importmap">
{
"imports": {
"@kiruse/cosmos-components": "https://esm.sh/@kiruse/cosmos-components@latest"
}
}
</script>
<script type="module" src="@kiruse/cosmos-components"></script>
</head>
<body>
<button id="connect-wallet">Connect Wallet</button>
<p>Your address is: <cosmos-user-address /></p>
<script type="module">
import { modals } from '@kiruse/cosmos-components';
document.getElementById('connect-wallet').addEventListener('click', () => {
modals.showWalletModal('MY_WALLET_CONNECT_PROJECT_ID');
});
</script>
</body>
</html>Last updated