Hello! Today I decided to talk about my small project, namely about the HTML framework in the style of Material Design. You can download it from GitHub: link . It works best on Webkit browsers. Now take a closer look.
After connecting the material.css and material.js to the document, add the following script to the header:
This code will set the primary and secondary color of the document. What it is and what color schemes are available can be found in the official manual . ')
Now you can start adding items to the page. The library contains the main elements described by the Material Design concept, here they are:
Notice that the div element is assigned invalid attributes value, min, max, step. However, when the page loads, an input element will automatically be created, which will receive these attributes, and there will be no error.
Fields:
Code:
<divclass ="mtextfield"label="Enter your text here"></div>
Radio buttons flags and switches:
Code:
<inputclass="checkbox"type="checkbox"id="raz" ><labelfor="raz">Check me</label><inputclass="checkbox"type="checkbox"id="raz2" ><labelfor="raz2">Check me</label><inputclass="radio"type="radio"name="raz"id="raz3"value="1"checked="" /><labelfor="raz3">Switch me1</label><inputclass="radio"type="radio"name="raz"id="raz4"value="2" /><labelfor="raz4">Switch me2</label><inputclass="switch"type="checkbox"id="switch1"value="2"/><labelfor="switch1">Switch me 3</label><inputclass="switch"type="checkbox"id="switch2"value="2"/><labelfor="switch2">Switch me 4</label>
Here only part of the elements is presented, the rest can be seen in this demo document: link . If anyone is interested in this framework, I will write another article about other available elements and additional functionality of the bibliotek.
PS When writing the framework, I used materials from the sites: