Catalog npm
Back to packageRELEASE DETAILS

0.2.0

npm

@0x-jerry/unocss-preset-daisyui

Daisyui preset for UnoCSS

Published12 May 2025
Direct dependencies17
Transitive dependenciesNot calculated

README

Current package documentation

UnoCSS Preset Daisyui

A UnoCSS preset for daisyui. Due to the implementation, this is 100% compatible with daisyui with some trade-offs.

Install

pnpm i @0x-jerry/unocss-preset-daisyui daisyui -D

Usage

unocss.config.ts

import { defineConfig, presetMini, presetWind4 } from "unocss";
import { presetDaisyui } from "@0x-jerry/unocss-preset-daisyui";

export default defineConfig({
  presets: [
    presetMini(),
    // When use with wind4 preset, you need to disable reset preflight,
    // because preset daisyui already included it.
    presetWind4({
      preflights: {
        reset: false,
      },
    })
    presetDaisyui(),
  ],
});

main.ts

import "uno.css";
import "daisyui/theme/light.css";

Limitations

Due to the implementation of this preset, here has some limitations:

  1. All daisyui classes will only available in global scope.
  2. daisyui/theme/light.css is required, or you can import any theme you want from daisyui/theme.
  3. You can't use @apply with daisyui classes.
  4. daisyui classes is not fully on-demand, so the bundle size may larger than expected.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 17

Native requirements
17 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
unocss
Environment
{
  "local_name": "unocss",
  "alias": false,
  "peer_metadata": null
}
^66.1.1runtime
daisyui
Environment
{
  "local_name": "daisyui",
  "alias": false,
  "peer_metadata": null
}
^5.0.35runtime
postcss
Environment
{
  "local_name": "postcss",
  "alias": false,
  "peer_metadata": null
}
^8.5.3runtime
css-tree
Environment
{
  "local_name": "css-tree",
  "alias": false,
  "peer_metadata": null
}
^3.1.0runtime
fast-glob
Environment
{
  "local_name": "fast-glob",
  "alias": false,
  "peer_metadata": null
}
^3.3.3runtime
postcss-nested
Environment
{
  "local_name": "postcss-nested",
  "alias": false,
  "peer_metadata": null
}
^7.0.2runtime
@0x-jerry/utils
Environment
{
  "local_name": "@0x-jerry/utils",
  "alias": false,
  "peer_metadata": null
}
^5.0.0runtime
import-meta-resolve
Environment
{
  "local_name": "import-meta-resolve",
  "alias": false,
  "peer_metadata": null
}
^4.1.0runtime
tsx
Environment
{
  "local_name": "tsx",
  "alias": false,
  "peer_metadata": null
}
^4.19.4development
tsup
Environment
{
  "local_name": "tsup",
  "alias": false,
  "peer_metadata": null
}
^8.4.0development
vitest
Environment
{
  "local_name": "vitest",
  "alias": false,
  "peer_metadata": null
}
^3.1.3development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^5.8.3development
@types/node
Environment
{
  "local_name": "@types/node",
  "alias": false,
  "peer_metadata": null
}
^22.15.17development
@biomejs/biome
Environment
{
  "local_name": "@biomejs/biome",
  "alias": false,
  "peer_metadata": null
}
^1.9.4development
@types/css-tree
Environment
{
  "local_name": "@types/css-tree",
  "alias": false,
  "peer_metadata": null
}
^2.3.10development
@0x-jerry/x-release
Environment
{
  "local_name": "@0x-jerry/x-release",
  "alias": false,
  "peer_metadata": null
}
^2.4.0development
@vitest/coverage-v8
Environment
{
  "local_name": "@vitest/coverage-v8",
  "alias": false,
  "peer_metadata": null
}
^3.1.3development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "c8d4eecc566f3e262828fed34f5f8f68dbc034d5",
  "tarball": "https://registry.npmjs.org/@0x-jerry/unocss-preset-daisyui/-/unocss-preset-daisyui-0.2.0.tgz",
  "fileCount": 5,
  "integrity": "sha512-de/7kSww546GQjx8vKf/dPKr1+LfEI4CLoYptdZiR4yy6lvO4pnIFHql2LUaHn9/M6sL9GDuxaV6bYUaPLnMLA==",
  "signatures": [
    {
      "sig": "MEUCIQCiiCGJrC7OgknqKaGRIsmUqK/xJDPvd78qj2KhjgOCXQIgMUedcsiEVQVtEFHKTI+4VaTDtGsFj7Zs85WhTYkgEf4=",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    }
  ],
  "unpackedSize": 6552
}

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:16 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:3deb78f824c9423498c26e879d28972ba31fea8336c3ffff91dff5a2eabe2bdf

Other collected versions

0.2.319 Oct0.2.216 Oct0.2.118 May0.1.111 May0.1.011 MayView all collected versions →