<div align="center">
	<a href="https://www.npmjs.com/package/@query-api/nuxt"  align="center">
		<img src="https://online-images-sr.netlify.app/assets/nuxt-craft.png"  alt="Vue Craft CMS banner">
	</a>
	<h1 align="center">@query-api/nuxt</h1>
  <p align="center">
    Write Craft CMS Queries in Nuxt, like you would in Twig. 🚀🚀
  </p>
  <br />
</div>

<p align="center">
  <a href="https://www.npmjs.com/package/@query-api/nuxt">
    <img src="https://img.shields.io/npm/v/%40query-api%2Fnuxt?color=blue" alt="Nuxt Craft CMS latest version" />
  </a>
  <a href="https://www.npmjs.com/package/@query-api/nuxt" rel="nofollow">
    <img src="https://img.shields.io/npm/d18m/%40query-api%2Fnuxt?color=blue" alt="Nuxt Craft CMS downloads">
  </a>
  <a href="https://www.npmjs.com/package/@query-api/nuxt" rel="nofollow">
    <img src="https://img.shields.io/npm/l/%40query-api%2Fnuxt?color=blue" alt="Nuxt Craft CMS license">
  </a>
</p>

## Install

```bash
npm install @query-api/nuxt
```

> [!TIP]
>
> [Documentation](https://samuelreichor/libraries/nuxt-craftcms)

## Features

- **Query builder:** Easily build and execute queries directly from Nuxt, enabling flexible,
  real-time data retrieval from Craft CMS
- **Built in Helper Components:** Connect your data directly with your Vue components, to speed up
  development.
- **Get Only the Data You Need:** Avoid overfetching by using a custom function in the query builder
  to select only the fields you require.
- **Pretty Json:** Json Transformer are in place to prettify the response.
- **Support for Main Element Types:** Query addresses, assets, entries and users.
- **Full Typescript Suppport**: Craft Query Builder with typescript support pretty cool hah?😎
- **Multisite Composables**: Built in composables to support Craft Multisites.
- **SeoMatic Composables**: Connect SeoMatic with Nuxt fast with the built in SeoMatic composables.

## Requirements

This plugin requires Nuxt 3 and the
[Craft Query API](https://github.com/samuelreichor/craft-query-api) installed on your Craft CMS
instance.

## Documentation

Visit the [Nuxt SDK documentation](https://samuelreichor.at/libraries/nuxt-craftcms) for all
documentation, guides and developer resources.

## Further Resources

- [Craft CMS Plugin](https://samuelreichor.at/libraries/craft-query-api): The Craft CMS Plugin, that
  powers this great stuff.
- [JS SDK](https://samuelreichor.at/libraries/js-craftcms-api): The core package of the query
  builder.
- [Vue SDK](https://samuelreichor.at/libraries/vue-craftcms): A package to use the query builder in
  Vue.

## Support

If you encounter bugs or have feature requests, [please submit an issue](/../../issues/new). Your
feedback helps improve the library!
