@anweb/nuxt-ancore

Ancore Nuxt module
9,158 1
Install
npm install @anweb/nuxt-ancore
Latest Version:1.20.1
Vue:3
License:MIT
Last Updated:Oct 7, 2026
Links: GitHub  ·  npm
Maintainer: angusev

Ancore module for Nuxt

npm version npm downloads Nuxt

A set of composables, components and utilities for Nuxt to handle common tasks: data fetching with SSR, paginated lists, form validation, dialogs, i18n and more.

Setup

npm i @anweb/nuxt-ancore
export default defineNuxtConfig({
  modules: ['@anweb/nuxt-ancore']
})

Configuration

Options can be set inline under the ancore key in nuxt.config, or extracted into a standalone ancore.config.ts at the project root:

// ancore.config.ts
import { defineAncoreConfig } from '@anweb/nuxt-ancore'

export default defineAncoreConfig({
  api: '~/utils/api',
  i18n: {
    lng: 'en',
    fallbackLng: 'en',
    resources: {
      en: { translation: '~~/locales/en.json' }
    }
  }
})

Both sources are merged; values set inline in nuxt.config override the file.

Composables

Name Description
useAnData Data fetching with SSR/CSR support, URL params, query and auto-refresh
useAnList Paginated lists with infinite scroll, filters and reverse mode
useAnForm Form state, validation (async-validator), history and diff tracking
useAnDialogs Dynamic dialogs: open, close, closeAll, swipe-to-dismiss
useAnI18n i18next integration with per-component namespaces and language switching
useAnEventBus SSR-safe useEventBus wrapper with a typed, predefinable channel registry

Components

Name Description
AnTab Headless tab with lazy rendering and state preservation via display: none
AnDropdown Dropdown with CSS Anchor Positioning, teleport and ARIA. match-width sizes the menu to the trigger

Utilities

Name Description
toQuery Converts an object to a URL query string, filtering out null/undefined
asyncInit SSR-aware init helper: awaits during SSR, fires without await on CSR
coreApi Core API wrapper around $fetch; infers the response type from the Nitro route and method
userApi Routes through the app's api when configured, otherwise coreApi; same inference

Version History

Version Released Vue License
1.20.1 MIT
1.20.0 MIT
1.19.0 MIT
1.18.0 MIT
1.17.1 MIT