Get started with nutui CDN

MIT licensed

Nutui is a lightweight, modular UI component library for Vue.js applications.

Tags:
  • nutui
  • nutui2
  • nutui3
  • nutui4
  • vue
  • vue3
  • webpack
  • vue component
  • vue3 component
  • vite
  • jdc
  • jdcfe

Stable version

Copied!

How to start using nutui CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with nutui CDN - cdnhub.io</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nutui@4.3.2/dist/nutui.css">
</head>
<body>
  <div id="app">
    <nut-button theme="primary" @click="handleClick">Click me</nut-button>
  </div>
  <script src="https://cdn.cdnhub.io/nutui/4.3.2/nutui.umd.js"></script>
  <script>
    const app = {
      template: `
        <div>
          <nut-button theme="primary" @click="handleClick">Click me</nut-button>
        </div>
      `,
      data() {
        return {
          count: 0,
        };
      },
      methods: {
        handleClick() {
          this.count++;
          console.log('Button clicked', this.count);
        },
      },
      mounted() {
        new Vue({
          el: '#app',
          render: h => h(this),
        });
      },
    };

    new Vue({
      render: h => h(app),
    }).$mount('#app');
  </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!

All versions