Reference

Guide

Libraries

The Panel bundles a few common libraries that also can be used by plugins.

How to access libraries

The Panel exposes all shared libraries via this.$library:

// example in the Vue component of a custom field

panel.plugin("your/date-display-field", {
  fields: {
    "date-display": {
      // …
      computed: {
        currentDate() {
          return this.$library.dayjs().format("DD/MM/YYYY");
        }
      }
      // …
    }
  }
});

Available libraries

Library Description
this.$library.autosize Automatically adjust textarea height to fit text.
Documentation ›
this.$library.dayjs Parse, validate, manipulate, and display dates and times.
Documentation ›