Skip to content
PluginStats

@porbit/style weekly downloads statistics

By porbit · npm · Webpack plugins

PresenceStyle: utility CSS engine mở — parse class runtime, sinh CSS theo layer/media, trích xuất CSS tĩnh, bộ component mẫu và MCP server cho agent AI.

View on npm Fresh · Dec 6, 2026

@porbit/style has 42 recorded weekly downloads on npm, a decrease of 82.1% over the past 30 days, ranking #2817 of 3,247 tracked listings.

Weekly downloads
42
Official API · Dec 5, 2026
7-day growth
+2.4%
+1 weekly downloads
30-day growth
-82.1%
-192 weekly downloads
90-day growth
+600%
+36 weekly downloads
Rank
#2817
▼ 163 in 7 days

About @porbit/style

PresenceStyle (@porbit/style)

Tiếng Việt · English

@porbit/style là utility CSS engine siêu nhẹ, parse class theo cú pháp ngắn và sinh CSS runtime theo layer + media. Đây là công thức tổng quát, không phải bộ class đóng: bảng alias chỉ là lối tắt, còn mọi property và giá trị CSS đều viết được (xem Từ vựng mở). Người dùng Tailwind có thể chuyển sang bằng helper migration.

Cài Đặt Nhanh

1) NPM / pnpm / yarn / bun
npm install @porbit/style
pnpm add @porbit/style
yarn add @porbit/style
bun add @porbit/style

Yêu cầu Node.js 20 trở lên cho CLI, SSR và MCP server. Package không có dependency runtime.

2) Dùng trực tiếp qua URL (không cần bundler)

Lưu ý:

  1. dist/index.js là CommonJS (Node).
  2. Trình duyệt dùng dist/index.mjs hoặc dist/index-auto.mjs.

Option A: chủ động khởi tạo

<script type="module">
  import xcss from 'https://unpkg.com/@porbit/style@latest/dist/index.mjs';

  xcss.cssObserve(document, {
    dictionaryImport: true
  });
</script>

Option B: auto observe khi import (bản nhẹ nhất: chỉ lõi runtime, không gồm Tailwind helper)

<script type="module" src="https://unpkg.com/@porbit/style@latest/dist/index-auto.mjs"></script>

CDN thay thế: https://cdn.jsdelivr.net/npm/@porbit/style@latest/dist/index.mjs

Dùng Trong 60 Giây

import xcss from '@porbit/style';

xcss.cssObserve(document);
<button class="dF aiC jcC p10px;16px bdN bdra8px bgc#0a64e8 cWhite">
  Đăng nhập
</button>

Muốn dựng giao diện từ đầu (thẻ đăng nhập, lưới responsive, bảng tra alias, lỗi thường gặp), xem Hướng dẫn thiết kế nhanh. Muốn biết cách viết bất kỳ CSS nào (property chưa có alias, custom property, hàm CSS, điều kiện, media), xem Từ vựng mở.

Contract Cú Pháp

Mỗi utility class theo form:

[Media]:[Layer][Property][Value][@Selector]

Thứ tự parse bắt buộc:

  1. selector (hậu tố @..., nằm ngoài []).
  2. media (tiền tố trước :).
  3. layer (chuỗi số liên tiếp ở đầu).
  4. property.
  5. value.

Ý nghĩa từng phần:

  1. Media (tùy chọn): key media như sm, md, lg, hoặc key custom.
  2. Layer (tùy chọn): số ưu tiên cascade.
  3. Property (bắt buộc): alias thuộc dictionary, hoặc tên CSS đầy đủ của bất kỳ property chuẩn nào (view-transition-name[hero]), custom property --ten[gia-tri], hoặc property có tiền tố nhà cung cấp (-webkit-line-clamp[3]). Xem Từ vựng mở.
  4. Value (bắt buộc với utility chuẩn): giá trị CSS, alias value hoặc arbitrary value.
  5. @Selector (tùy chọn): ví dụ @:hover, @::before.

Ngoại lệ parser (special syntax):

  1. [AliasName]: class group alias (không dùng value trực tiếp).
  2. &...: nhánh selector đặc biệt.
Media Mặc Định Và Thứ Tự Nội Bộ

Engine nạp media theo thứ tự:

Thứ tựKeyQuery
1defaultKhông bọc @media
2xsscreen and (max-width: 575px)
3smscreen and (min-width: 576px)
4mdscreen and (min-width: 768px)
5lgscreen and (min-width: 992px)
6xlscreen and (min-width: 1200px)
72xlscreen and (min-width: 1400px)
8smascreen and (max-width: 768px)
9mdascreen and (max-width: 992px)
10lgascreen and (max-width: 1200px)
11xlascreen and (max-width: 1400px)

Quy tắc custom breakpoint:

  1. breakpoints được nối vào sau danh sách mặc định.
  2. Nếu trùng key, key khai báo sau cùng ghi đè key trước (last write wins).

Ví dụ:

xcss.cssObserve(document, {
  breakpoints: [
    { tablet: 'screen and (min-width: 768px)' }
  ]
});

Dùng class: tablet:dB.

Layer Mặc Định
  1. Nếu không khai báo layer, engine dùng 0.
  2. Engine tạo sẵn 24 layer: l0 -> l23.
  3. Nên dùng dải 0-23 để giữ thứ tự ổn định.
  4. Số layer lớn hơn luôn thắng số nhỏ hơn, kể cả khi class layer nhỏ nằm trong media đang khớp (ví dụ 5cBlue thắng md:cRed ở màn hình md; muốn ghi đè theo breakpoint hãy dùng md:5cRed).

Quy Tắc Điểm Ngắt Đầy Đủ

Mục tiêu là tách class thành tuple: { media, layer, property, value, selector }

Thứ tự xử lý bắt buộc:

  1. Tách selector: lấy phần sau ký tự @ cuối cùng, chỉ khi @ nằm ngoài [].
  2. Tách media: nếu còn : thì phần trước : là media.
  3. Tách layer: đọc chuỗi số liên tiếp ở đầu phần còn lại.
  4. Tách property/value: quét trái -> phải và dừng property theo bảng quyết định.
  5. Nếu phần còn lại bắt đầu bằng & hoặc [ thì đi vào nhánh special syntax.
Bảng Quyết Định Khi Quét property
Ký tự đang xétĐiều kiệnHành động
a-zluôn đúngvẫn là property
- hoặc .ký tự kế tiếp là sốdừng property, phần còn lại là value
-gặp -- và đã có ít nhất 1 ký tự propertydừng property, bắt đầu value (CSS variable)
- hoặc .không rơi vào 2 điều kiện trênvẫn là property
ký tự khác (A-Z, 0-9, #, !, [, (, %, ...)luôn đúngdừng property, phần còn lại là value
Chuẩn Hóa value Sau Khi Tách
  1. Value bắt đầu bằng ! -> thêm hậu tố !important.
  2. Value bắt đầu bằng -- -> đổi thành var(--...).
  3. Value dạng [...] -> bỏ [ ], rồi thay _ và ; thành khoảng trắng (\_ giữ dấu gạch dưới; nội dung url(...) giữ nguyên).
  4. Ký tự # trong value giữ nguyên (hex color).

Quy trình chuẩn hóa:

class -> selector -> media -> layer -> property -> value
if value startsWith('!') => important
if value startsWith('--') => var(value)
if value is bracketed [..] => strip brackets + replace ';' with ' '

Bảng Sai -> Đúng (Những Lỗi Gây Vỡ Parse)…

Description from the npm listing.

  • presence
  • presence-style
  • porbit
  • css
  • css-in-js
  • utility
  • atomic-css
  • utility-first
  • static-extraction
  • ssr
  • typescript
  • x-css
  • components
  • design-system
  • mcp
  • model-context-protocol
  • vite-plugin
  • webpack-plugin
  • nextjs
  • tailwindcss

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@porbit/style weekly downloads on npm, last 90 days: 42 weekly downloads as of Dec 5, 2026, +600% over 90 days.@porbit/styleWeekly downloads on npm · Last 90 days42downloads / week+600% over 90 days0100200300400Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@porbit/style weekly downloads on npm, last 90 days: 42 weekly downloads as of Dec 5, 2026, +600% over 90 days.

7/30/90-day growth

@porbit/style weekly downloads growth on npm: +2.4% over 7 days, -82.1% over 30 days, +600% over 90 days.@porbit/styleWeekly downloads growth on npm42downloads / week now7-day growth+1 weekly downloads+2.4%30-day growth-192 weekly downloads-82.1%90-day growth+36 weekly downloads+600%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@porbit/style weekly downloads growth on npm: +2.4% over 7 days, -82.1% over 30 days, +600% over 90 days.

Ranking history

@porbit/style npm ranking history: currently #2817 (by weekly downloads).@porbit/stylenpm ranking · by weekly downloads · Last 90 days#2817current rank#1600#1800#2000#2200#2400#2600#2800#3000Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankNov 17, 2026 – Dec 6, 2026 · 20 observations · Updated Dec 5, 2026pluginstats.com
@porbit/style npm ranking history: currently #2817 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 141, #19 (overall #2,819)
All npm: every listing in weekly downloads order

Listing placement

Webpack plugins349 listings · 18 pages · page 13, #11 (overall #251)
Webpack plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (135)
Recent weekly downloads observations for @porbit/style
Date (UTC)Weekly downloadsChange vs. previous
42+15
27-9
36+3
33-5
38-8
46+4
42+1
41+1
40+6
34-9
43-2
45-172
217-177
394—

Similar npm Webpack plugins plugins

All 20 @porbit/style alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@porbit/style. First seen Nov 17, 2026; last successful collection Dec 6, 2026. See the methodology.