# Getting Started
The fastest way to get started, is to install one of the prebuilt components.
For now vue-js-cron
provides the following prebuilt components:
- CronLight - a lightweight cron editor without external dependencies
- CronVuetify - a cron editor for Vuetify.js.
If you would like to use a different UI framework, follow the quick start guide on how to use the renderless component.
# CronLight
# Installation
Open up a terminal and run the following command:
yarn add @vue-js-cron/light@^1.0.5
or
npm install @vue-js-cron/light@^1.0.5
# Usage
Then you need to register vue-js-cron/light
with Vue.use()
import cronLight from '@vue-js-cron/light'
import '@vue-js-cron/light/dist/light.css'
Vue.use(cronLight)
Now you can use the component CronLight
.
# API
# CronVuetify
# Installation
Open up a terminal and run the following command:
yarn add @vue-js-cron/vuetify@^2.1.0
or
npm install @vue-js-cron/vuetify@^2.1.0
# Usage
Then you need to register vue-js-cron/vuetify
with Vue.use()
import cronVuetify from '@vue-js-cron/vuetify'
import '@vue-js-cron/vuetify/dist/vuetify.css'
Vue.use(cronVuetify)
Now you can use the component CronVuetify
.
# API
# Renderless
This guide will explain how to use the renderless component of vue-js-cron. In this example Vuetify (opens new window) will be used to render the component, but you should be able to follow along using any UI framework.
# Installation
First open up a terminal and run the following command:
yarn add @vue-js-cron/core@^2.1.2
or
npm install @vue-js-cron/core@^2.1.2
# Usage
Then you need to register vue-js-cron/core
with Vue.use()
import cronCore from '@vue-js-cron/core'
Vue.use(cronCore)
Now you can use the component CronCore
. The default scoped slot (opens new window) of CronCore
provides the following props:
fields
- each field corresponds to one position in the cron expression. Default fields: month, day, day of week, hour and minute.period
- defines which fields are visibleerror
- error message