GithubHelp home page GithubHelp logo

ppaskaris-d2l / checkbox Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brightspaceui/checkbox

0.0 0.0 0.0 88 KB

Polymer-based web component for D2L checkboxes

Home Page: http://ui.developers.brightspace.com

License: Apache License 2.0

HTML 100.00%

checkbox's Introduction

d2l-checkbox

Published on webcomponents.org Bower version Build status

Polymer-based web component for D2L checkboxes.

screenshot of checkbox component

For further information on this and other Brightspace UI components, see the docs at ui.developers.brightspace.com.

Installation

d2l-checkbox can be installed from Bower:

bower install d2l-checkbox

Usage

Include the webcomponents.js "lite" polyfill (for browsers who don't natively support web components), then import d2l-checkbox.html:

<head>
	<script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
	<link rel="import" href="bower_components/d2l-checkbox/d2l-checkbox.html">
</head>

A <d2l-checkbox> custom element can now be used in your application. The label for your checkbox should be placed inside the element:

<d2l-checkbox>Label for checkbox</d2l-checkbox>

Many of the same attributes from native <input type="checkbox"> are available:

<d2l-checkbox checked>Checked checkbox</d2l-checkbox>

To hide the label when space is limited, use the aria-label attribute to provide an accessible label:

<d2l-checkbox aria-label="label for checkbox"></d2l-checkbox>

Developing, Testing and Contributing

After cloning the repo, run npm install to install dependencies.

If you don't have it already, install the Polymer CLI globally:

npm install -g polymer-cli

To start a local web server that hosts the demo page and tests:

polymer serve

To lint (eslint and Polymer lint):

npm run lint

To run unit tests locally using Polymer test:

polymer test --skip-plugin sauce

To lint AND run local unit tests:

npm test

checkbox's People

Contributors

dlockhart avatar dbatiste avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.