Convert Figma logo to code with AI

jdf2e logonutui

京东风格的移动端 Vue 组件库,支持多端小程序(A Vue.js UI Toolkit for Mobile Web)

6,128
833
6,128
119

Top Related Projects

23,249

A lightweight, customizable Vue UI library for mobile web apps.

Essential UI blocks for building mobile web apps.

9,122

:large_orange_diamond: A fantastic mobile ui lib implement by Vue

15,860

A Vue 3 Component Library. Fairly Complete. Theme Customizable. Uses TypeScript. Fast.

🎉 A Vue.js 3 UI Library made by Element team

🌈 An enterprise-class UI components based on Ant Design and Vue. 🐜

Quick Overview

NutUI is a Vue.js-based UI component library developed by JD.com for mobile web applications. It offers a wide range of customizable components designed to create efficient and visually appealing mobile interfaces, with support for both Vue 2 and Vue 3.

Pros

  • Comprehensive set of mobile-optimized UI components
  • Supports both Vue 2 and Vue 3 frameworks
  • Customizable themes and styles
  • Well-documented with examples and API references

Cons

  • Primarily focused on mobile web development, may not be suitable for desktop applications
  • Some components may have limited customization options compared to more extensive UI libraries
  • Documentation is primarily in Chinese, which may be challenging for non-Chinese speakers

Code Examples

  1. Installing NutUI in a Vue 3 project:
npm i @nutui/nutui
  1. Importing and using a NutUI component (Button):
<template>
  <nut-button type="primary">Primary Button</nut-button>
</template>

<script>
import { Button } from '@nutui/nutui';

export default {
  components: {
    'nut-button': Button
  }
}
</script>
  1. Using NutUI's Grid component:
<template>
  <nut-grid :column-num="3">
    <nut-grid-item icon="home" text="Home" />
    <nut-grid-item icon="category" text="Category" />
    <nut-grid-item icon="cart" text="Cart" />
  </nut-grid>
</template>

<script>
import { Grid, GridItem } from '@nutui/nutui';

export default {
  components: {
    'nut-grid': Grid,
    'nut-grid-item': GridItem
  }
}
</script>

Getting Started

To use NutUI in your Vue 3 project:

  1. Install NutUI:
npm i @nutui/nutui
  1. Import and use NutUI components in your Vue file:
<template>
  <nut-button type="primary">Hello NutUI</nut-button>
</template>

<script>
import { Button } from '@nutui/nutui';

export default {
  components: {
    'nut-button': Button
  }
}
</script>
  1. Import NutUI styles in your main.js or main.ts file:
import '@nutui/nutui/dist/style.css';

Now you can start using NutUI components in your Vue application!

Competitor Comparisons

23,249

A lightweight, customizable Vue UI library for mobile web apps.

Pros of Vant

  • Larger community and more active development, with over 20k GitHub stars
  • More comprehensive documentation and examples
  • Wider range of components and features

Cons of Vant

  • Larger bundle size due to more components
  • Steeper learning curve for beginners
  • Less focus on lightweight and minimalistic design

Code Comparison

NutUI example:

<template>
  <nut-button type="primary">Primary Button</nut-button>
</template>

<script>
import { Button } from '@nutui/nutui';
</script>

Vant example:

<template>
  <van-button type="primary">Primary Button</van-button>
</template>

<script>
import { Button } from 'vant';
</script>

Both NutUI and Vant are Vue.js UI component libraries for mobile applications. NutUI is developed by JD.com, while Vant is created by Youzan. The code examples show similar usage patterns for basic components like buttons.

Vant offers a more extensive set of components and features, making it suitable for complex applications. However, this comes at the cost of a larger bundle size and potentially more complexity for simple projects.

NutUI, on the other hand, focuses on being lightweight and easy to use, which can be advantageous for smaller projects or developers who prefer a minimalistic approach. However, it may lack some advanced features found in Vant.

Essential UI blocks for building mobile web apps.

Pros of Ant Design Mobile

  • More comprehensive documentation and examples
  • Larger community and ecosystem support
  • Better internationalization and accessibility features

Cons of Ant Design Mobile

  • Heavier bundle size
  • Steeper learning curve for beginners
  • Less flexibility in customization compared to NutUI

Code Comparison

NutUI example:

<template>
  <nut-button type="primary">Primary Button</nut-button>
</template>

<script>
import { Button } from '@nutui/nutui';
</script>

Ant Design Mobile example:

import { Button } from 'antd-mobile'

const App = () => (
  <Button color="primary">Primary Button</Button>
)

Both libraries offer similar component APIs, but Ant Design Mobile tends to have more props and configuration options for each component. NutUI's approach is often simpler and more straightforward, which can be beneficial for smaller projects or developers who prefer a minimalistic approach.

Ant Design Mobile provides a more comprehensive set of components and features, making it suitable for larger, more complex applications. However, this comes at the cost of a larger bundle size and potentially more complex usage.

NutUI, on the other hand, offers a lighter-weight solution with a focus on performance and ease of use. It may be more suitable for projects where bundle size is a critical factor or for developers who prefer a simpler, more streamlined component library.

9,122

:large_orange_diamond: A fantastic mobile ui lib implement by Vue

Pros of cube-ui

  • More comprehensive documentation and examples
  • Larger community and longer development history
  • Better support for custom themes and styles

Cons of cube-ui

  • Larger bundle size, which may impact performance
  • Less frequent updates compared to NutUI
  • More complex setup process for some features

Code Comparison

NutUI component usage:

<template>
  <nut-button type="primary">Primary Button</nut-button>
</template>

<script>
import { Button } from '@nutui/nutui';
</script>

cube-ui component usage:

<template>
  <cube-button :primary="true">Primary Button</cube-button>
</template>

<script>
import { CubeButton } from 'cube-ui';
export default {
  components: { CubeButton }
}
</script>

Both libraries offer similar component APIs, but cube-ui often requires explicit component registration. NutUI generally provides a more streamlined import process and simpler usage syntax. However, cube-ui offers more customization options and advanced features for complex applications.

15,860

A Vue 3 Component Library. Fairly Complete. Theme Customizable. Uses TypeScript. Fast.

Pros of Naive UI

  • More comprehensive component library with 80+ components
  • Better TypeScript support and type definitions
  • More active development and frequent updates

Cons of Naive UI

  • Steeper learning curve due to its complexity
  • Larger bundle size, which may impact performance
  • Limited mobile-specific components compared to NutUI

Code Comparison

NutUI (Vue 3):

<template>
  <nut-button type="primary">Primary Button</nut-button>
</template>

<script>
import { Button } from '@nutui/nutui';
export default {
  components: { 'nut-button': Button }
};
</script>

Naive UI:

<template>
  <n-button type="primary">Primary Button</n-button>
</template>

<script>
import { NButton } from 'naive-ui';
export default {
  components: { NButton }
};
</script>

Summary

NutUI is a lightweight UI component library focused on mobile development, while Naive UI offers a more comprehensive set of components suitable for both desktop and mobile applications. NutUI provides a simpler API and smaller bundle size, making it ideal for mobile-first projects. Naive UI, on the other hand, offers more advanced features, better TypeScript support, and a wider range of components, but comes with a steeper learning curve and larger bundle size.

🎉 A Vue.js 3 UI Library made by Element team

Pros of Element Plus

  • More comprehensive component library with a wider range of UI elements
  • Better documentation and examples, making it easier for developers to implement
  • Larger community and more frequent updates, ensuring better long-term support

Cons of Element Plus

  • Larger bundle size, which may impact performance for smaller applications
  • Steeper learning curve due to the extensive component library
  • Less focus on mobile-first design compared to NutUI

Code Comparison

Element Plus:

<template>
  <el-button type="primary">Primary Button</el-button>
  <el-input v-model="input" placeholder="Please input"></el-input>
</template>

<script>
import { ref } from 'vue'
export default {
  setup() {
    const input = ref('')
    return { input }
  }
}
</script>

NutUI:

<template>
  <nut-button type="primary">Primary Button</nut-button>
  <nut-input v-model="input" placeholder="Please input"></nut-input>
</template>

<script>
import { ref } from 'vue'
export default {
  setup() {
    const input = ref('')
    return { input }
  }
}
</script>

Both libraries offer similar component usage, but Element Plus generally provides more customization options and props for each component.

🌈 An enterprise-class UI components based on Ant Design and Vue. 🐜

Pros of ant-design-vue

  • More comprehensive component library with a wider range of UI elements
  • Better documentation and examples for developers
  • Stronger community support and more frequent updates

Cons of ant-design-vue

  • Larger bundle size, which may impact performance for smaller projects
  • Steeper learning curve due to its extensive feature set
  • Less focus on mobile-first design compared to NutUI

Code Comparison

NutUI example:

<template>
  <nut-button type="primary">Primary Button</nut-button>
</template>

<script>
import { Button } from '@nutui/nutui';
</script>

ant-design-vue example:

<template>
  <a-button type="primary">Primary Button</a-button>
</template>

<script>
import { Button } from 'ant-design-vue';
</script>

Both libraries offer similar component usage, but ant-design-vue generally provides more customization options and props for each component. NutUI focuses on simplicity and mobile-first design, while ant-design-vue offers a more comprehensive set of components suitable for complex web applications.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

logo

京东风格的轻量级 Vue 组件库,支持移动端 H5 和 小程序开发

PRs Welcome coverage license

GitHub contributors GitHub commit activity GitHub closed issues GitHub commits since latest release (by date) GitHub Release Date jsdelivr

NutUI      


Nut[nʌt],源自电影《冰河世纪》里松鼠 Scrat "执迷不悟",一生追求,即便引发大灾难也绝不松手的坚果。

简体中文 | English

特性

  • 🚀 80+ 高质量组件,覆盖移动端主流场景
  • 💪 支持一套代码同时开发 H5+多端小程序
  • 📖 基于京东APP 10.0 视觉规范
  • 🍭 支持按需引用
  • 📖 详尽的文档和示例
  • 💪 支持 TypeScript
  • 💪 支持服务端渲染(测试阶段)
  • 🍭 支持组件级别定制主题,内置 700+ 个变量
  • 🌍 国际化支持,已支持英文,印尼语和繁体中文
  • 🍭 单元测试覆盖率超过 80%,保障稳定性
  • 📖 提供 Sketch 设计资源

文档

官网:nutui.jd.com

@nutui/nutui:适用于移动端 H5 页面开发

@nutui/nutui-taro:支持开发 Taro 多端小程序(微信、支付宝、京东等小程序)和 Taro-H5 项目

链接

官方生态

由 NutUI 官方团队维护的项目如下:

项目描述版本
@nutui/nutuiNutUI 移动端 H5 版本nutui
@nutui/nutui-taroNutUI Taro 多端版本nutui
@nutui/icons-vue@nutui/nutui 使用的图标库nutui
@nutui/icons-vue-taro@nutui/nutui-taro 使用的图标库nutui
@nutui/touch-emulator在桌面端使用 NutUI 的辅助库nutui
@nutui/auto-import-resolverunplugin-auto-import 插件的 reolver 配置nutui
@nutui/playgroundNutUI 在线 Playground-
nutui-demoNutUI 官方示例合集-

社区生态

由社区维护的项目如下,欢迎补充:

项目描述
nutui-uniapp基于 NutUI 4.x 版本开发的 uni-app 组件库
jwaterwater/uni-nutui基于 NutUI 3.x 版本开发的 uni-app 组件库
common-intellisense提供 NutUI 4.x 版本智能提示的 vscode 插件

项目状态

Alt

使用案例

NutUI 已经投入了我们的生产环境中使用,业界也在广泛地使用 NutUI 开发多端应用。

NutUI

更多案例

开发交流

微信群内部咚咚群
添加好友并回复「NutUI Vue」82957939

参与共建

NutUI 社区共建倡议

NutUI 邀您共建,Contributor 您好

为 NutUI 贡献代码

NutUI 的共建方向主要分为:解决 issue、修复 bug、新增组件、增加国际化、UI 定制、平台适配、跨端扩展等。

欢迎社区开发者参与共建,在贡献您的代码之前请先阅读 《NutUI 贡献指南》。

问题反馈与建议

给 NutUI 提 Issue

在反馈问题之前,推荐阅读 《提问的智慧》、《如何向开源社区提问题》和《如何有效地报告 Bug》,这样您能够更容易获得理解和帮助。

参与 NutUI 社区讨论

如果您有任何想法、疑问或建议,都可以参与社区讨论分享您的观点。

贡献者们

感谢以下所有给 NutUI 贡献过代码的 开发者。

contributors

更新日志

查阅 Release。

License

MIT

GitHub Stargazaers

stargazers

NPM DownloadsLast 30 Days