Skip to content

Plugins

Plugins extend the app without making the core larger.

js
app.use(plugin)

Built-in helpers

ZhinNX includes early helpers for theme, form, auth, icons, and animation. They are intentionally small and practical.

Plugin shape

js
function themePlugin(app) {
  app.theme = {
    set(value) {
      document.documentElement.dataset.theme = value
    }
  }
}

app.use(themePlugin)

Rule of thumb

Use plugins for behavior that is reused across pages. Keep one-off behavior inside actions.

Released under the MIT License.