Directory

xtal-material - Vaadin Add-on Directory

Lightweight Free Material Components xtal-material - Vaadin Add-on Directory
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/bahrus/xtal-material) Light weight material design V1 web components, based on Jon Uhlmann's [pure CSS material design form elements](https://codepen.io/jonnitto/pen/OVmvPB). For tabs we build on Ben Mildren's [Material Design CSS Only Tabs](https://codepen.io/mildrenben/pen/bdGdOb). NB: There are a number of [far](https://github.com/material-components/material-components-web-components) [more](https://vaadin.com/components/browse) [robust](https://www.webcomponents.org/collection/PolymerElements/paper-elements) [alternative](https://ionicframework.com/docs/components/) [material](https://web-padawan.github.io/aybolit/?path=/story/bootstrap--abs-button) design web components you should definitely check out. The text input also supports autocomplete / combobox functionality. It has a property, options, which expects the following interface: ```TypeScript export interface IXtalInputOptions { data: any[], textFld: string, keyFld: string, } ``` It utilizes the [datalist](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist). ## The Duality Principle >It seems as though we must use sometimes JavaScript and sometimes declarative markup, while at times we may use either. We are faced with a new kind of difficulty. We have two contradictory pictures of reality; separately neither of them fully explains the phenomena of good web design, but together they do. -- [Albert Einstein](https://en.wikipedia.org/wiki/Wave%E2%80%93particle_duality) If you look at the codepen examples these components derive from, one observes they do not contain any JavaScript. Unfortunately, lack of support for importing HTML kind of forces these components to adopt a slower, more complex, and less risk-free format -- JavaScript. But xtal-material is well-positioned to adopt HTML format when HTML modules land.
``` --> ## Install the Polymer-CLI First, make sure you have the [Polymer CLI](https://www.npmjs.com/package/polymer-cli) and npm (packaged with [Node.js](https://nodejs.org)) installed. Run `npm install` to install your element's dependencies, then run `polymer serve` to serve your element locally. ## Viewing Your Element ``` $ polymer serve ``` ## Running Tests WIP