1.3.8 • Published 10 days ago

@sfxcode/formkit-primevue-nuxt v1.3.8

Weekly downloads
-
License
MIT
Repository
github
Last release
10 days ago

FormKit PrimeVue Nuxt

npm version npm downloads License Nuxt

Nuxt Module for PrimeVue based FormKit Inputs for using FormKit with the PrimeVue UI Framework.

Based on sfxcode/formkit-primevue.

Features

  •  Validation by FormKit
  • 🚠  UI by PrimeVue
  • 🏎  Auto import for formkit-primevue components and composables

Nuxt Module Dependencies

  • primevue-nuxt Module
  • formkit-nuxt Module

Both are auto installed by default, this can be disabled in the module options.

Quick Setup

Install the module to your Nuxt application with one command:

npx nuxi module add @sfxcode/formkit-primevue-nuxt

That's it! You can now use FormKit PrimeVue Nuxt Module in your Nuxt app ✨

Module Options

  • includePrimeIcons (default: true): Add PrimeIcons CSS to the project.
  • includeStyles (default: true): Add custom FormKit CSS to the project.
  • installI18N (default: true): Install nuxt i18n module automatically.
  • installFormKit (default: true): Install nuxt formkit module automatically.

Removed options since 1.2.0

  • formkitAutoConfig : Automatically configure FormKit. => Removed in favor of installFormKit
  • formkitLocale ,formkitPluginAnimate, formkitPluginAsterisk : use formkit.config.ts for custom configuration

FormKit Configuration

Use a formkit.config.ts file to configure FormKit.

// formkit.config.ts
import type { DefaultConfigOptions } from '@formkit/vue'
import { primeInputs, primeOutputs } from '@sfxcode/formkit-primevue'

const config: DefaultConfigOptions = {
  // Define the active locale
  inputs: { ...primeInputs, ...primeOutputs },
}

export default config

Additional Configuration

For i18n support, you can add the following configuration to your nuxt.config.ts:

i18n: {
  locales: [
    {
      code: 'en',
      file: 'en.json',
    },
    {
      code: 'de',
      file: 'de.json',
    },
  ],
  defaultLocale: 'en',
  vueI18n: {
    fallbackLocale: 'en',
  },
},

Also define some locales and a sufficient configuration for Vue I18n. Example is provided in the playground

Contribution

1.2.0

7 months ago

1.3.7

19 days ago

1.2.8

6 months ago

1.3.6

30 days ago

1.2.7

6 months ago

1.3.5

1 month ago

1.2.6

6 months ago

1.1.7

7 months ago

1.3.4

1 month ago

1.2.5

7 months ago

1.1.6

7 months ago

1.3.3

1 month ago

1.2.4

7 months ago

1.1.5

7 months ago

1.3.2

2 months ago

1.2.3

7 months ago

1.1.4

7 months ago

1.3.1

3 months ago

1.2.2

7 months ago

1.1.3

7 months ago

1.3.0

3 months ago

1.2.1

7 months ago

1.3.8

10 days ago

1.2.9

6 months ago

1.2.12

4 months ago

1.2.13

4 months ago

1.2.10

5 months ago

1.2.11

5 months ago

1.2.14

4 months ago

1.2.15

3 months ago

1.1.2

7 months ago