Giter Site home page Giter Site logo

mintbase-widgets's Introduction

Built With Stencil

Mintbase Widgets

This is a on-going project where you can load components straight from Mintbase and Near.

Components

My Nft Collection

This is the widget to showcase your NFT Collection @ NEAR Blockchain.

live example:

https://rub3n.xyz/

props:

  • user: mandatory
  • theme: optional: 'dark'

install on react

In the present moment React only working with pure React Webpack, not working with Vite.

npm install mintbase-widgets-react

import { MyNftCollection } from 'mintbase-widgets-react';
<MyNftCollection user={yourNearAccount} theme="dark">

next.js

  • install npm install mintbase-widgets

  • add this code to app.tsx

import { applyPolyfills, defineCustomElements } from 'mintbase-widgets/loader'

  useLayoutEffect(() => {
    applyPolyfills().then(() => {
      defineCustomElements(window)
    })
  }, [])
  • add to global.d.ts
declare namespace JSX {
  interface IntrinsicElements {
      'my-nft-collection': { 'user': string , 'theme': string};
  }
}
  • use it:
    <my-nft-collection user="your near username wallet" theme="dark"></my-nft-collection>

use with vanillajs and html

add script tag on head:

<script type='module' src="https://unpkg.com/[email protected]/dist/mintbase-widgets/mintbase-widgets.esm.js" ></script>

add web component to html

<my-nft-collection user={yourNearAccount} theme="dark"></my-nft-collection>

mintbase-widgets's People

Contributors

rubenmarcus avatar

Stargazers

Roman avatar Luís Freitas avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.