npm.io
1.29.0 • Published 2 weeks ago

@openremote/or-vaadin-components

Licence
AGPL-3.0-or-later
Version
1.29.0
Deps
26
Size
8.6 MB
Vulns
0
Weekly
0
Stars
1.9K

@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 fields or-vaadin-checkbox-group and or-vaadin-radio-group should use the "native" Vaadin child components, vaadin-checkbox and vaadin-radio-button, respectively. 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>
  <vaadin-radio-button></vaadin-radio-button>
  <vaadin-radio-button></vaadin-radio-button>
</or-vaadin-radio-group>

License

GNU AGPL