Top Related Projects
A lightweight, customizable Vue UI library for mobile web apps.
Essential UI blocks for building mobile web apps.
:large_orange_diamond: A fantastic mobile ui lib implement by Vue
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
- Installing NutUI in a Vue 3 project:
npm i @nutui/nutui
- 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>
- 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:
- Install NutUI:
npm i @nutui/nutui
- 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>
- 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
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.
: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.
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 designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
京ä¸é£æ ¼çè½»é级 Vue ç»ä»¶åºï¼æ¯æ移å¨ç«¯ H5 å å°ç¨åºå¼å
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/nutui | NutUI 移å¨ç«¯ H5 çæ¬ | |
@nutui/nutui-taro | NutUI Taro å¤ç«¯çæ¬ | |
@nutui/icons-vue | @nutui/nutui 使ç¨çå¾æ åº | |
@nutui/icons-vue-taro | @nutui/nutui-taro 使ç¨çå¾æ åº | |
@nutui/touch-emulator | å¨æ¡é¢ç«¯ä½¿ç¨ NutUI çè¾ å©åº | |
@nutui/auto-import-resolver | unplugin-auto-import æ件ç reolver é
ç½® | |
@nutui/playground | NutUI å¨çº¿ Playground | - |
nutui-demo | NutUI å®æ¹ç¤ºä¾åé | - |
社åºçæ
ç±ç¤¾åºç»´æ¤ç项ç®å¦ä¸ï¼æ¬¢è¿è¡¥å ï¼
é¡¹ç® | æè¿° |
---|---|
nutui-uniapp | åºäº NutUI 4.x çæ¬å¼åç uni-app ç»ä»¶åº |
jwaterwater/uni-nutui | åºäº NutUI 3.x çæ¬å¼åç uni-app ç»ä»¶åº |
common-intellisense | æä¾ NutUI 4.x çæ¬æºè½æ示ç vscode æ件 |
项ç®ç¶æ
使ç¨æ¡ä¾
NutUI å·²ç»æå ¥äºæ们çç产ç¯å¢ä¸ä½¿ç¨ï¼ä¸çä¹å¨å¹¿æ³å°ä½¿ç¨ NutUI å¼åå¤ç«¯åºç¨ã
å¼å交æµ
微信群 | å é¨åå群 |
---|---|
æ·»å 好å并åå¤ãNutUI Vueã | 82957939 |
åä¸å ±å»º
NutUI 社åºå ±å»ºå¡è®®
NutUI éæ¨å ±å»ºï¼Contributor æ¨å¥½
为 NutUI è´¡ç®ä»£ç
NutUI çå ±å»ºæ¹å主è¦å为ï¼è§£å³ issueãä¿®å¤ bugãæ°å¢ç»ä»¶ãå¢å å½é åãUI å®å¶ãå¹³å°éé ã跨端æ©å±çã
欢è¿ç¤¾åºå¼åè åä¸å ±å»ºï¼å¨è´¡ç®æ¨ç代ç ä¹å请å é 读 ãNutUI è´¡ç®æåãã
é®é¢åé¦ä¸å»ºè®®
å¨åé¦é®é¢ä¹åï¼æ¨èé 读 ãæé®çæºæ §ãããå¦ä½åå¼æºç¤¾åºæé®é¢ãåãå¦ä½ææå°æ¥å Bugãï¼è¿æ ·æ¨è½å¤æ´å®¹æè·å¾ç解å帮å©ã
å¦ææ¨æä»»ä½æ³æ³ãçé®æ建议ï¼é½å¯ä»¥åä¸ç¤¾åºè®¨è®ºå享æ¨çè§ç¹ã
è´¡ç®è 们
æ谢以ä¸ææç» NutUI è´¡ç®è¿ä»£ç ç å¼åè ã
æ´æ°æ¥å¿
æ¥é Releaseã
License
GitHub Stargazaers
Top Related Projects
A lightweight, customizable Vue UI library for mobile web apps.
Essential UI blocks for building mobile web apps.
:large_orange_diamond: A fantastic mobile ui lib implement by Vue
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. 🐜
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot