Skip to content
/ ui Public

🚧 A collection of Vue.js components for my projects.

License

Notifications You must be signed in to change notification settings

byyuurin/ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@byyuurin/ui

A collection of Vue.js components for my projects.

npm version npm downloads License

Preview

https://byyuurin-ui.netlify.app/

Installation

pnpm i -D unocss @unocss/reset @byyuurin/ui

icons

pnpm i -D @iconify-json/[the-collection-you-want]

Setup

UnoCSS

// uno.config.ts
import { preset as ui } from '@byyuurin/ui/unocss'
import { defineConfig, presetIcons, presetUno } from 'unocss'

export default defineConfig({
  presets: [
    presetUno(),
    presetIcons({
      cdn: 'https://esm.sh/', // OR install @iconify-json/[the-collection-you-want]
    }),
    ui({
      radius: '0rem', // optional
      radiusBox: '0rem', // optional
      radiusButton: '0rem', // optional
      radiusCheckbox: '0rem', // optional
      radiusRadio: '0rem', // optional
      radiusSwitch: '0rem', // optional
      radiusTabs: '0rem', // optional
      cb: '#1f2937', // optional
      cp: '#1f2937', // optional
      cx: '#ffffff', // optional
    }),
  ],
})

New Rules

  • ui-[color]
  • bg-soft-[color]
  • bg-soft-[color]/[mix-ratio]

Vite

// vite.config.ts

import UI from '@byyuurin/ui/vite'
import Vue from '@vitejs/plugin-vue'
import UnoCSS from 'unocss/vite'
import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [
    UnoCSS(),
    Vue(),
    UI({
      prefix: 'U', // optional
      autoImport: {
        dts: 'src/typed-imports.d.ts',
        imports: ['vue'],
      },
      components: {
        dts: 'src/typed-components.d.ts',
      },
    }),
  ],
})

Nuxt

// nuxt.config.ts

export default defineNuxtConfig({
  modules: [
    '@unocss/nuxt',
    '@byyuurin/ui/nuxt',
  ],
  css: [
    '@unocss/reset/tailwind.css',
  ],
  ui: {
    prefix: 'U', // optional
  },
})

Credits

License

MIT License © 2024-PRESENT Yuurin

About

🚧 A collection of Vue.js components for my projects.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages