# Modules

Druxt : object

The Vue.js Druxt component.

DruxtClass : class

DruxtJS utility class.

DruxtClient : class

DruxtJS JSON:API client.

DruxtComponentMixin : object

Vue.js Mixin to add support for the Wrapper system to a Druxt module.

DruxtNuxtModule : function

Nuxt module function to install Druxt.

DruxtStore : object

Vuex store module.

# Druxt : object

The Vue.js Druxt component.

See

Example (Register globally)

import Vue from 'vue'
import { Druxt } from 'druxt'

Vue.component(Druxt)
1
2
3
4

Example (Register locally)

<template>
  <Druxt :module="module" />
</template>

<script>
import { Druxt } from 'druxt'
export default {
  components: { Druxt }
}
</script>
1
2
3
4
5
6
7
8
9
10

# DruxtClass : class

DruxtJS utility class.

See: DruxtClass
Example

import { DruxtClass } from 'druxt'
const druxt = new DruxtClass()
1
2

# DruxtClient : class

DruxtJS JSON:API client.

See: DruxtClient
Example

import { DruxtClient } from 'druxt'
const druxt = new DruxtClient('https://demo-api.druxtjs.org')
1
2

# DruxtComponentMixin : object

Vue.js Mixin to add support for the Wrapper system to a Druxt module.

See

Example (CustomDruxtModule.vue)

<template>
  <component :is="component.is" v-bind="component.propsData">
    <!-- -->
  </component>
</template>

<script>
import { DruxtComponentMixin } from 'druxt'
export default {
  mixins: [DruxtComponentMixin]
}
</script>
1
2
3
4
5
6
7
8
9
10
11
12

# DruxtNuxtModule : function

Nuxt module function to install Druxt.

See: DruxtNuxtModule
Example (nuxt.config.js)

module.exports = {
  modules: [
    'druxt'
  ],
  druxt: {
    baseUrl: 'https://demo-api.druxtjs.org'
  }
}
1
2
3
4
5
6
7
8

# DruxtStore : object

Vuex store module.

See: DruxtStore