The @apophis-sdk/cosmos-components package is a collection of Web Components to bootstrap and elevate the development experience of Cosmos Dapps.

Usage

import { Apophis, Cosmos, DefaultCosmosMiddlewares } from '@apophis-sdk/cosmos';
import { CosmosComponents } from '@kiruse/cosmos-components';
import { reconnectSigner } from '@kiruse/cosmos-components/utils.js';
import '@kiruse/cosmos-components/preact.js'; // imports JSX types for Preact

Apophis.use(...DefaultCosmosMiddlewares);

CosmosComponents.register();

const networks = Promise.all([
  Cosmos.getNetworkFromRegistry('neutron'),
  Cosmos.getNetworkFromRegistry('neutrontestnet'),
  Cosmos.getNetworkFromRegistry('cosmoshub'),
]);

networks.then(networks => {
  reconnectSigner(networks);
});
There’s two main usages for the Cosmos Components:
  1. Vanilla HTML
  2. JSX
See their respective pages for more information.

Storybook

All components are showcased and documented in the Cosmos Components Storybook.

Contributing

Most certainly, there are still some useful general purpose components missing from this library. I always welcome feedback & contributions! Feel free to suggest new components at the issues or open a PR.