Git Product home page Git Product logo

onu-ui's Introduction

Onu UI (WIP)

Popular, beautiful and fast UnoCSS component library.

NPM version

๐Ÿง‘โ€๐Ÿ’ป Document Beta | ๐Ÿคนโ€โ™‚๏ธ Playground

Features

  • ๐ŸŒˆ Components Design - Onu provides neat & beautiful crafted UI components.
  • ๐Ÿ”ฅ On demand Import - Provide resolver to automatically import only used components.
  • ๐ŸŽ‰ Typescript Supported - Support TypeScript & type checked & type inference.
  • ๐Ÿ’Ž Iconify Icons - Use any icon from the library you love.
  • ๐Ÿฌ CSS Preset - Has UnoCSS preset package to use, rendered UI easily.
  • โš™๏ธ Theme Config - Use attribute mode like unocss to design. Support theme config to customize theme.

Usage

Full Import

pnpm i onu-ui
pnpm i unocss -D

Add onu-ui in your main entry file.

// main.ts
import OnuUI from 'onu-ui'
import 'uno.css'
import 'onu-ui/dist/style.css'

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

Custom UnoCSS config

Custom your UnoCSS config:

// uno.config.ts
import { defineConfig, presetAttributify, presetUno } from 'unocss'
import { presetOnu } from 'onu-ui'

export default defineConfig({
  presets: [
    // ...
    presetUno(),
    presetAttributify(),
    presetOnu(),
  ],
})

On-demand Import:

You need to use an additional plugin to import components you used. First you need to install unplugin-vue-components and unplugin-auto-import.

npm install -D unplugin-vue-components unplugin-auto-import

Then add the code below into your Vite config file.

// vite.config.ts
import { defineConfig } from 'vite'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { OnuResolver } from 'onu-ui'

export default defineConfig({
  // ...
  plugins: [
    // ...
    AutoImport({
      resolvers: [OnuResolver()],
    }),
    Components({
      resolvers: [OnuResolver()],
    }),
  ],
})

Online Playground

You can try OnuUI out with the components built-in playground.

Try it with our built-in playground

Playground

Try it with stackblitz or codesandbox


Contributing

Developers interested in contributing should read the Code of Conduct and the Contributing Guide.

Thanks to everyone who has already contributed to OnuUI!

Discussions

Since OnuUI is under intensive development, we need your valuable comments and feature requirements of the component

Welcome to contact us at Discussions or Issues, we will be more than happy to reply to your message.

Credits

License

MIT License ยฉ 2022 Chris

onu-ui's People

Contributors

baiwusanyu-c avatar brain777777 avatar ca-lee-b avatar charleewa avatar chengzicy avatar chenjiezi avatar chinbor avatar iceywu avatar joaopalmeiro avatar priority3 avatar prosperbao avatar wzc520pyfm avatar xiaojieajie avatar yzh990918 avatar zguolee avatar zhangmo8 avatar zyyv avatar

Stargazers

 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.