Coder Social home page Coder Social logo

shanksgx / ano-ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ano-ui/ano-ui

0.0 1.0 0.0 1.43 MB

轻量级、漂亮、快速的 UnoCSS 组件库

Home Page: https://ano-ui.vercel.app

License: MIT License

TypeScript 46.55% HTML 0.41% Vue 51.64% SCSS 1.40%

ano-ui's Introduction

Ano-UI

轻量级、漂亮、快速的 UnoCSS 组件库

NPM version

安装

pnpm add ano-ui
pnpm add -D unocss @iconify-json/tabler unocss-applet

使用

配置 UnoCSS:

// uno.config.ts
import { defineConfig, presetIcons } from 'unocss'

// unocss-applet https://github.com/unocss-applet/unocss-applet
import { presetApplet, presetRemRpx, transformerApplet } from 'unocss-applet'
import { presetAno } from 'ano-ui'

export default defineConfig({
  presets: [
    presetApplet(),
    presetRemRpx(),
    presetIcons({
      scale: 1.2,
      extraProperties: {
        'display': 'inline-block',
        'vertical-align': 'middle',
      },
    }),
    presetAno(),
  ],
  transformers: [
    transformerApplet(),
  ],
})

像下面这样更新 pages.json 文件:

{
  "easycom": {
    "autoscan": true,
    "custom": {
      "^A(.*)": "ano-ui/components/A$1/A$1.vue"
    }
  }
}

或者使用 @uni-helper/vite-plugin-uni-components 自动导入组件。

// vite.config.ts
import { defineConfig } from 'vite'

import Components from '@uni-helper/vite-plugin-uni-components'
import { AnoResolver } from 'ano-ui'

// https://vitejs.dev/config/
export default defineConfig({
  // ...
  plugins: [
    // ...
    Components({
      include: [/\.vue$/, /\.vue\?vue/],
      dts: 'src/components.d.ts',
      resolvers: [AnoResolver()],
    }),
  ],
})

And then enjoy it.

只需使用这样的按钮组件:

<template>
  <AButton>Button</AButton>
</template>

感谢

工具

UI 框架

License

MIT License © 2022-PRESENT Neil Lee and all contributors.

ano-ui's People

Contributors

zguolee avatar hairyf avatar kejunmao avatar hansuhhi avatar

Watchers

 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.