Skip to content

Commit 30338ed

Browse files
committed
docs: add readme and docs
1 parent 70760b9 commit 30338ed

File tree

2 files changed

+103
-1
lines changed

2 files changed

+103
-1
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
layout: ../../layouts/PageLayout.astro
3+
title: Nuxt integration
4+
description: VeeValidate Integration with nuxt
5+
order: 3
6+
---
7+
8+
import DocTip from '@/components/DocTip.vue';
9+
10+
# @vee-validate/nuxt
11+
12+
<div class="mb-10 w-full flex items-center justify-center">
13+
<img class="h-40" src="https://github.com/logaretm/vee-validate/raw/main/logo.png">
14+
15+
<a class="ml-4" href="https://nuxt.com/" target="_blank">
16+
<img class="h-40" src="https://nuxt.com/assets/design-kit/logo/full-logo-green-dark.png" />
17+
</a>
18+
</div>
19+
20+
<p align="center">
21+
<a href="https://github.com/sponsors/logaretm">
22+
<img src='https://sponsors.logaretm.com/sponsors.svg'>
23+
</a>
24+
</p>
25+
26+
Official vee-validate's Nuxt module
27+
28+
## Features
29+
30+
- Auto import of vee-validate components
31+
- Auto import of vee-validate composables
32+
- Detecting if you are using `zod` or `yup` and exposing the `toTypedSchema` suitable for either.
33+
34+
<DocTip type="warning">
35+
36+
No types are exposed by default to avoid having conflicts with other libraries, aside from vee-validate's main API components/composables. You can still import them via `vee-validate`.
37+
38+
</DocTip>
39+
40+
## Getting Started
41+
42+
In your nuxt project install the vee-validate nuxt module:
43+
44+
```sh
45+
# npm
46+
npm i @vee-validate/nuxt
47+
48+
# pnpm
49+
pnpm add @vee-validate/nuxt
50+
51+
# yarn
52+
yarn add @vee-validate/nuxt
53+
```
54+
55+
Then add the module to your `modules` config in `nuxt.config.ts`:
56+
57+
```ts
58+
export default defineNuxtConfig({
59+
// ...
60+
modules: [
61+
//...
62+
'@vee-validate/nuxt',
63+
],
64+
});
65+
```

packages/nuxt/README.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# @vee-validate/zod
1+
# @vee-validate/nuxt
22

33
<p align="center">
44
<a href="https://vee-validate.logaretm.com/v4/guide/global-validators" target="_blank">
@@ -18,4 +18,41 @@
1818
</a>
1919
</p>
2020

21+
Official vee-validate's Nuxt module
22+
23+
## Features
24+
25+
- Auto import of vee-validate components
26+
- Auto import of vee-validate composables
27+
- Detecting if you are using `zod` or `yup` and exposing the `toTypedSchema` suitable for either.
28+
2129
## Getting Started
30+
31+
In your nuxt project install the vee-validate nuxt module:
32+
33+
```sh
34+
# npm
35+
npm i @vee-validate/nuxt
36+
37+
# pnpm
38+
pnpm add @vee-validate/nuxt
39+
40+
# yarn
41+
yarn add @vee-validate/nuxt
42+
```
43+
44+
Then add the module to your `modules` config in `nuxt.config.ts`:
45+
46+
```ts
47+
export default defineNuxtConfig({
48+
// ...
49+
modules: [
50+
//...
51+
'@vee-validate/nuxt',
52+
],
53+
});
54+
```
55+
56+
## Types
57+
58+
No types are exposed by default to avoid having conflicts with other libraries, aside from vee-validate's main API components/composables. You can still import them via `vee-validate`.

0 commit comments

Comments
 (0)