Skip to content

v1.2.0 — Alpine presets, Astro mode, Background Blocks

Choose a tag to compare

@njbSaab njbSaab released this 04 Sep 09:00
· 124 commits to main since this release

njx-alpine.js — Alpine.js presets ⛰

New distributed file: js/njx-alpine.js (~3 KB min). One word of x-data instead of a hand-written state object — 8 ready presets that toggle the exact classes the CSS already ships:

Preset Component
njxCollapse / njxAccordion collapse, exclusive accordion
njxTabs tabs (select(i) / isActive(i))
njxDropdown dropdown with outside-click + Escape
njxModal modal — backdrop, Escape, body scroll lock
njxToasts stackable toasts with auto-dismiss
njxCarousel carousel/slider — auto slide count, autoplay, hover pause
njxTheme theme switch + localStorage persistence
<script defer src="https://cdn.jsdelivr.net/npm/njx-ui@1/js/njx-alpine.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3/dist/cdn.min.js"></script>

<div class="collapse" x-data="njxCollapse">…</div>

njx.js is not required — presets and helpers are two independent drivers for the same classes.

Alpine across the docs

  • Every interactive component on njxui.dev now has a JS | Alpine.js code tab: tabs, modals, toasts, notifications, sidebar, carousels, theme switcher, animations.
  • New docs section: Alpine Presets — setup + before/after for every preset, raw x-data recipes kept as the "how it works" reference.
  • Quick Start got a full Interactive (JS / Alpine) mode: driver wiring step, live-state step, and an "Interact" chapter.

Astro 🚀

  • Docs and Quick Start run a dedicated Astro mode: import 'njx-ui/css/style.min.css' in your Layout — zero JS shipped by default.
  • New official starter theme: astro-njx-saas — a complete SaaS landing on Astro 5 + njX UI + Alpine (data-driven sections, ~30 lines of custom CSS). Repo and live demo coming right after this release.

Also in 1.2.0

  • Background Blocks — new _backgrounds.css: muted section tints (bg-tint, bg-tint-primary/-accent/-success), fades (bg-fade-down/up), radial glows (bg-glow, bg-glow-primary/-accent) and patterns (bg-dots, bg-grid-lines), all from the theme palette.
  • .input fix — symmetric 1rem .5rem padding everywhere, float-label overrides cleaned up.
  • Downloadable starter njxui-your-project on /examples: themed header, 100dvh hero with CDN pill, reviews on hero-slider, contact form — every element is a library class.

Full Changelog: v1.1.5...v1.2.0