Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

1.7 KB
Raw Blame

@openremote/or-vaadin-components

NPM Version

Package containing Vaadin Web Components, built with Lit, with a slight adjustment to work within the OpenRemote ecosystem. For documentation you can check out their website.

Install

npm i @openremote/or-vaadin-components
yarn add @openremote/or-vaadin-components

Usage

JavaScript / TypeScript example using a Text Field

Note: using the document.createElement() API is an example here. Please check the documentation of your JavaScript framework for proper installation of Lit web components.

import "@openremote/or-vaadin-components/or-vaadin-text-field";

// Load text field into the app
const textField = document.createElement("or-vaadin-text-field");
textField.setAttribute("label", "Company name");
textField.setAttribute("value", "OpenRemote");
document.body.appendChild(textField);

Group fields

The group field or-vaadin-checkbox-group takes vaadin-checkbox children and or-vaadin-radio-group takes or-vaadin-radio-button children. These are registered when importing the group fields.

<or-vaadin-checkbox-group>
  <vaadin-checkbox></vaadin-checkbox>
  <vaadin-checkbox></vaadin-checkbox>
</or-vaadin-checkbox-group>

<or-vaadin-radio-group>
  <or-vaadin-radio-button></or-vaadin-radio-button>
  <or-vaadin-radio-button></or-vaadin-radio-button>
</or-vaadin-radio-group>

License

GNU AGPL