GithubHelp home page GithubHelp logo

varletjs / varlet Goto Github PK

View Code? Open in Web Editor NEW
4.7K 48.0 595.0 39.29 MB

A mobile component library based on Vue3, Material Design 2, Material Design 3, and supports desktop development.

Home Page: https://varlet.gitee.io/varlet-ui/#/en-US/index

License: MIT License

JavaScript 23.50% TypeScript 32.42% Vue 34.86% Less 9.12% EJS 0.10%
vuejs3 ui-library ts vue3 typescript material-design mobile vue material components javascript js ui-kit ui material-design-3

varlet's Introduction

VARLET

A mobile component library based on Vue3, Material Design 2, Material Design 3, and supports desktop development.

Documentation(Vercel) | Documentation(Gitee) | 中文README

version stars vue licence coverage ci


Intro

Varlet is a Material design mobile component library developed based on Vue3, developed and maintained by varletjs community team.

Features

  • 🚀   Provide 60+ high quality general purpose components
  • 🚀   Components are very lightweight
  • 💪   Developed by Chinese, complete Chinese and English documentation and logistics support
  • 🛠️   Support on-demand introduction
  • 🛠️   Support theme customization
  • 🌍   Support internationalization
  • 💡   Support WebStorm syntax highlighting
  • 💪   Support the SSR
  • 📦   Support Nuxt Module
  • 💡   Support the Typescript
  • 💪   Make sure more than 90 percent unit test coverage, providing stability assurance
  • 🎨   Supports both Material Design 2 and Material Design 3 design systems
  • 🛠️   Support dark mode
  • 🔧   Provide official VSCode extension
  • ⌨️   Support Accessibility (still improving)

Install

CDN

varlet.js contain all the styles and logic of the component library, and you can import them.

<div id="app"></div>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
 <!-- Desktop Adaptation -->
<script src="https://cdn.jsdelivr.net/npm/@varlet/touch-emulator/iife.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@varlet/ui/umd/varlet.js"></script>
<script>
  const app = Vue.createApp({
    template: '<var-button>Button</var-button>'
  })
  app.use(Varlet).mount('#app')
</script>

Webpack / Vite

# Install with npm or yarn or pnpm

# npm
npm i @varlet/ui -S

# yarn
yarn add @varlet/ui

# pnpm
pnpm add @varlet/ui
import App from './App.vue'
import Varlet from '@varlet/ui'
import { createApp } from 'vue'
import '@varlet/ui/es/style'

createApp(App).use(Varlet).mount('#app')

Official Ecosystem

The following projects are maintained by the official team for a long time.

Name Description
@varlet/cli Vue3 component library rapid prototyping tool
@varlet/touch-emulator Desktop adapter, so that the mobile component library can run on the desktop
@varlet/ui-playground Varlet component library online editing tool
@varlet/import-resolver A resolver for unplugin-vue-components used to implement Varlet and import it on demand
@varlet/preset-unocss UnoCss presets for varlet
@varlet/preset-tailwindcss tailwindcss presets for varlet
varlet-theme-builder Theme generator for generating theme variables for varlet Material Design 3
varlet-vscode-extension Varlet Component Library VSCode Plugin
vscode-theme-varlet Varlet VSCode Theme
varlet-app-example Varlet component library app template
varlet-install-example Case collection of Varlet component library and various ecosystem integration

Community Ecosystem

The following projects are maintained by community personnel, welcome to add.

Name Description
vue-h5-template Vue-based mobile template scaffolding, providing mobile presets for Varlet component library
create-vite-app A desktop template scaffolding based on Vue3, providing desktop presets for Varlet component library
vscode-common-intellisense A VS Code extension that provides better intellisense to Varlet developers

Playground

See Varlet UI Playground.

Contribution

See Contributing Guide.

Community

We recommend that issue be used for problem feedback, or others:

  • Wechat group

Thanks to contributors

Thanks to the following sponsors

Sponsor this project

Sponsor this project to support our better creation. It is recommended to use afdian to subscribe, and your avatar will appear in this project.

Afdian

https://afdian.net/a/haoziqaq

Wechat / Alipay

varlet's People

Contributors

a145789 avatar ahqrt avatar alec1815 avatar ayangweb avatar aybrea avatar beadre avatar chouchouji avatar chunhuigao avatar coderyarn avatar dyggod avatar erkelost avatar fatezeros avatar forestxiecode avatar gaoting avatar haoziqaq avatar hutututtt avatar jiechen66 avatar kanghuiyi66 avatar linkscope avatar qytayh avatar rss1102 avatar sdhushu avatar songjianet avatar tiny-dust avatar wangkbweb avatar wf-1202 avatar yhoney7 avatar yuding2019 avatar zhangmo8 avatar zhenyuwang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

varlet's Issues

能不能提供侧边菜单?

能不能提供菜单组件,效果类似于 jakiestfu/Snap.js这种?
移动端如果想在菜单上和PC端有类似的导航体验,可以采用这种设计,用起来也比较像APP。

按开发步骤启动不了

Site development building █████████████████████████ building (51%) 6/8 entries 17/17 dependencies 4/7 modules 3 active
babel-loader › ../../../../#OpenSource/varlet/packages/varlet-cli/site/pc/main.ts

Server running at http://0.0.0.0:8081
(node:54917) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be one of type string, TypedArray, or DataView. Received type undefined
at Hash.update (internal/crypto/hash.js:58:11)
at BulkUpdateDecorator.update (/Users/qinhua/Desktop/MyCode/#OpenSource/varlet/node_modules/webpack/lib/util/createHash.js:51:14)
at NormalModule.updateHash (/Users/qinhua/Desktop/MyCode/#OpenSource/varlet/node_modules/webpack/lib/NormalModule.js:1129:8)
at Compilation._createModuleHash (/Users/qinhua/Desktop/MyCode/#OpenSource/varlet/node_modules/webpack/lib/Compilation.js:3085:10)
at Compilation.createModuleHashes (/Users/qinhua/Desktop/MyCode/#OpenSource/varlet/node_modules/webpack/lib/Compilation.js:3057:10)
at hooks.optimizeChunkModules.callAsync.err (/Users/qinhua/Desktop/MyCode/#OpenSource/varlet/node_modules/webpack/lib/Compilation.js:2334:11)
at Hook.eval [as callAsync] (eval at create (/Users/qinhua/Desktop/MyCode/#OpenSource/varlet/node_modules/tapable/lib/HookCodeFactory.js:33:10), :10:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/qinhua/Desktop/MyCode/#OpenSource/varlet/node_modules/tapable/lib/Hook.js:18:14)
at hooks.optimizeTree.callAsync.err (/Users/qinhua/Desktop/MyCode/#OpenSource/varlet/node_modules/webpack/lib/Compilation.js:2294:36)
at eval (eval at create (/Users/qinhua/Desktop/MyCode/#OpenSource/varlet/node_modules/tapable/lib/HookCodeFactory.js:33:10), :18:1)
(node:54917) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:54917) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@varlet/touch-emulator,在桌面端体验不友好

安装@varlet/touch-emulator,并在main.js中导入:
import '@varlet/touch-emulator'

但是切换效果不理想:
希望效果:按住鼠标左键滑动时,切换
当前效果:按住鼠标左键滑动,然后松开,再次滑动才切换

朋友varlet这么项目是怎么跑的,我看用的是lerna的架构?

全局安装了sudo npm install @varlet/cli -g 然后代在varlet-ui路径李 npm run dev 还是跑不起来 留个联系方式呗,想聊聊这个ui库
$ npm run dev

@varlet/[email protected] dev /Users/zhongzhenhua/Downloads/varlet-dev 2/packages/varlet-ui
varlet-cli dev

internal/fs/utils.js:307
throw err;
^

Error: EACCES: permission denied, open '/usr/local/lib/node_modules/@varlet/cli/site/site.config.json'
at Object.openSync (fs.js:476:3)
at Object.writeFileSync (fs.js:1467:35)
at getVarletConfig (/usr/local/lib/node_modules/@varlet/cli/lib/config/varlet.config.js:10:16)
at Object. (/usr/local/lib/node_modules/@varlet/cli/lib/config/varlet.config.js:14:24)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18) {
errno: -13,
syscall: 'open',
code: 'EACCES',
path: '/usr/local/lib/node_modules/@varlet/cli/site/site.config.json'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @varlet/[email protected] dev: varlet-cli dev
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @varlet/[email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/zhongzhenhua/.npm/_logs/2021-04-25T10_18_01_730Z-debug.log

国际化如何使用

有完整的国际例子吗?官网不够详细,如:1.国际化的语言文件位置、格式;2.如何在html和js中使用

有哪些内置的图标?

“Material Design Icon”中的图标是否全部内置?如下代码不显示图标
<var-icon name="angle-acute" />

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.