VueAirport can be installed in any Vue 3 or Nuxt 3 project using your preferred package manager.
VueAirport is organized as a monorepo with separate packages. Install what you need:
# Core only
npm install vue-airport
# With base plugins
npm install vue-airport @vue-airport/plugins-base
# With DevTools
npm install vue-airport vue-airport-devtools
# Core only
yarn add vue-airport
# With base plugins
yarn add vue-airport @vue-airport/plugins-base
# With DevTools
yarn add vue-airport vue-airport-devtools
# Core only
pnpm add vue-airport
# With base plugins
pnpm add vue-airport @vue-airport/plugins-base
# Core only
bun add vue-airport
# With base plugins
bun add vue-airport @vue-airport/plugins-base
Import useCheckIn from the core package:
<script setup lang="ts">
import { useCheckIn } from 'vue-airport';
// Your component logic
</script>
If you installed @vue-airport/plugins-base, import plugins separately:
<script setup lang="ts">
import { useCheckIn } from 'vue-airport';
import {
createActiveItemPlugin,
createValidationPlugin,
createHistoryPlugin,
createDebouncePlugin
} from '@vue-airport/plugins-base';
// Your component logic
</script>
You're ready to go! Check out the Examples to see VueAirport in action.
{
"dependencies": {
"vue": "^3.3.0",
"vue-airport": "latest",
"@vue-airport/plugins-base": "latest"
}
}
{
"dependencies": {
"nuxt": "^3.0.0",
"vue-airport": "latest",
"@vue-airport/plugins-base": "latest",
"vue-airport-devtools": "latest"
}
}
vue-airport-devtools package provides automatic integration with Vue DevTools in Nuxt projects.VueAirport is written in TypeScript and provides full type definitions out of the box. No additional type packages are needed.
import { useCheckIn } from 'vue-airport';
import type { DeskCore, CheckInItem } from 'vue-airport';
interface MyData {
label: string;
value: number;
}
const { createDesk } = useCheckIn<MyData>();
const { desk } = createDesk('myDesk');
// Fully typed desk and items
const items: CheckInItem<MyData>[] = desk.getAll();
VueAirport includes built-in plugins in the @vue-airport/plugins-base package:
import { useCheckIn } from 'vue-airport';
import {
createActiveItemPlugin,
createHistoryPlugin,
createValidationPlugin,
createDebouncePlugin
} from '@vue-airport/plugins-base';
const { createDesk } = useCheckIn();
const { desk } = createDesk('myDesk', {
plugins: [
createActiveItemPlugin(),
createHistoryPlugin({ maxHistory: 50 }),
]
});
VueAirport is organized as a monorepo with separate packages for optimal tree-shaking: