npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

unocss-preset-naive-ui

v0.0.2

Published

unocss + naive-ui

Downloads

4

Readme

unocss-preset-naive-ui

WIP

This preset will help you make naive-ui and unocss work together. Based on unocss-preset-theme.

Installation

npm i -D unocss-preset-naive-ui

Usages

We use uno.config.ts as an example below.

import { defineConfig, presetUno } from 'unocss';
import { presetNaiveUi } from 'unocss-preset-naive-ui';

export default defineConfig({
  presets: [
    presetUno(),
     // place after other presets, since it overrides some values by default
    presetNaiveUi({ ... }),
  ],
});

We recommend you to use tailwind compat reset if you are facing style conflicts.

Options

You can a options object to the preset.

import { defineConfig, presetUno } from 'unocss';
import { presetNaiveUi } from 'unocss-preset-naive-ui';

export default defineConfig({
  presets: [
    presetUno(),
    presetNaiveUi({
      // top-level options
      prefix: '--un-preset-n',
      preferCssVariables: true,
      namespace: '',

      // theme options
      primary: '#18a058',
      light: {
        primary: '#18a058',
      },
      dark: {
        primary: '#63e2b7',
      },
    }),
  ],
});

prefix

Top-level Option

This option is extended from unocss-preset-theme. Defaults to --un-preset-n.

selectors

Top-level Option

This option is extended from unocss-preset-theme and use its default value.

You may need to update this field when you are developing with uni-app, taro, etc.

preferCssVariables

Top-level Option

Prefer existed css variables or not. Defaults to true.

If true, use naive-ui css variables and you have to follow naive-ui design standards.

If false, use generated variables and you can use more variables away from naive-ui design standards.

You may need to set this field to false when you are developing with uni-app, taro, etc.

namespace

Top-level Option

The namespace used to find css variables. Used when preferCssVariables is true. Defaults to ``.

breakpoints

Top-level Option

Breakpoints. Defaults to { xs: '0px', s: '640px', m: '1024px', l: '1280px', xl: '1536px', xxl: '1920px' }.

primary

Base primary color. Used when preferCssVariables is false.

By default #18a058 for light theme and #63e2b7 for dark theme.

primaryHover

Hover primary color. Used when preferCssVariables is false.

By default #36ad6a for light theme and #7fe7c4 for dark theme.

primaryPressed

Pressed primary color. Used when preferCssVariables is false.

By default #0c7a43 for light theme and #5acea7 for dark theme.

primarySuppl

Supplement(?) primary color. Used when preferCssVariables is false.

By default #36ad6a for light theme and rgb(42, 148, 125) for dark theme.

info

Base info color. Used when preferCssVariables is false.

By default #2080f0 for light theme and #70c0e8 for dark theme.

infoHover

Hover info color. Used when preferCssVariables is false.

By default #4098fc for light theme and #8acbec for dark theme.

infoPressed

Pressed info color. Used when preferCssVariables is false.

By default #1060c9 for light theme and #66afd3 for dark theme.

infoSuppl

Supplement(?) info color. Used when preferCssVariables is false.

By default #4098fc for light theme and rgb(56, 137, 197) for dark theme.

success

Base success color. Used when preferCssVariables is false.

By default #18a058 for light theme and #63e2b7 for dark theme.

successHover

Hover success color. Used when preferCssVariables is false.

By default #36ad6a for light theme and #7fe7c4 for dark theme.

successPressed

Pressed success color. Used when preferCssVariables is false.

By default #0c7a43 for light theme and #5acea7 for dark theme.

successSuppl

Supplement(?) success color. Used when preferCssVariables is false.

By default #36ad6a for light theme and rgb(42, 148, 125) for dark theme.

warning

Base warning color. Used when preferCssVariables is false.

By default #f0a020 for light theme and #f2c97d for dark theme.

warningHover

Hover warning color. Used when preferCssVariables is false.

By default #fcb040 for light theme and #f5d599 for dark theme.

warningPressed

Pressed warning color. Used when preferCssVariables is false.

By default #c97c10 for light theme and #e6c260 for dark theme.

warningSuppl

Supplement(?) warning color. Used when preferCssVariables is false.

By default #fcb040 for light theme and rgb(240, 138, 0) for dark theme.

error

Base error color. Used when preferCssVariables is false.

By default #d03050 for light theme and #e88080 for dark theme.

errorHover

Hover error color. Used when preferCssVariables is false.

By default #de576d for light theme and #e98b8b for dark theme.

errorPressed

Pressed error color. Used when preferCssVariables is false.

By default #ab1f3f for light theme and #e57272 for dark theme.

errorSuppl

Supplement(?) error color. Used when preferCssVariables is false.

By default #de576d for light theme and rgb(208, 58, 82) for dark theme.

danger

Base danger color. Used when preferCssVariables is false.

By default #d03050 for light theme and #e88080 for dark theme.

dangerHover

Hover danger color. Used when preferCssVariables is false.

By default #de576d for light theme and #e98b8b for dark theme.

dangerPressed

Pressed danger color. Used when preferCssVariables is false.

By default #ab1f3f for light theme and #e57272 for dark theme.

dangerSuppl

Supplement(?) danger color. Used when preferCssVariables is false.

By default #de576d for light theme and rgb(208, 58, 82) for dark theme.