Skip to content

Quickstart

Getting started with @nhtio/lucid-resourceful-vue-components is quick and easy. Just follow the steps below and you'll be up and running in no time.

Prerequisites

Installation

You can install @nhtio/lucid-resourceful-vue-components directly from your preferred package manager

sh
npm i @nhtio/lucid-resourceful-vue-components
sh
pnpm add @nhtio/lucid-resourceful-vue-components
sh
yarn add @nhtio/lucid-resourceful-vue-components

Usage

Before using the components and utilities provided by @nhtio/lucid-resourceful-vue-components, you will need to boot and attach the IoC Container to the Vue Application.

ts
import { createApp } from 'vue'
import { IoC } from '@nhtio/lucid-resourceful-vue-components'
import { default as App } from './app.vue'

createApp(App).use(IoC).mount('#app')
ts
import { defineNuxtPlugin } from 'nuxt/app'
import { IoC } from '@nhtio/lucid-resourceful-vue-components'
export default defineNuxtPlugin((nuxtApp) => {
    nuxtApp.vueApp.use(IoC)
})

Then components can be easily imported and used as desired:

vue
<script lang="ts" setup>
import { ResourcefulAlerter, ResourcefulIndex, ResourcefulRecord } from "@nhtio/lucid-resourceful-vue-components/components";
const alerter = ref<ResourcefulAlerter | null>(null)
</script>

<template>
    <v-app>
        <v-main>
            <resourceful-index />
            <resourceful-record />
            <resourceful-alerter ref="alerter" />
        </v-main>
    </v-app>
</template>

Library Contents

In order to faciliate tree-shaking where possible, the library has a barrel-file & specific export structure:

components
autorefresh_controller
control_button_bar
control_button
control_menu
custom_field
exporter
fields
bigint
boolean
date_time
date
enum
integer
number
string
unsigned_integer
form_with_validation
resourceful_alerter
resourceful_index
resourceful_record_default_form
resourceful_record_form
resourceful_record
sortable
svg_icon
timezone_picker
composables
exceptions
factories
guards
helpers
http
icons
ioc
symbols
types

Each module re-exports all of the modules included in it.

For more information and easier navigation, see: