https://github.com/polymerelements/paper-button
A button à la Material Design
https://github.com/polymerelements/paper-button
Last synced: 10 months ago
JSON representation
A button à la Material Design
- Host: GitHub
- URL: https://github.com/polymerelements/paper-button
- Owner: PolymerElements
- Created: 2015-04-23T02:37:20.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2023-10-16T13:59:20.000Z (over 2 years ago)
- Last Synced: 2024-12-14T20:04:59.407Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://www.webcomponents.org/element/PolymerElements/paper-button
- Size: 1.06 MB
- Stars: 137
- Watchers: 20
- Forks: 64
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/@polymer/paper-button)
[](https://travis-ci.org/PolymerElements/paper-button)
[](https://webcomponents.org/element/@polymer/paper-button)
## <paper-button>
Material design: [Buttons](https://www.google.com/design/spec/components/buttons.html)
`paper-button` is a button. When the user touches the button, a ripple effect emanates from the point of contact. It may be flat or raised. A raised button is styled with a shadow.
See: [Documentation](https://www.webcomponents.org/element/@polymer/paper-button),
[Demo](https://www.webcomponents.org/element/@polymer/paper-button/demo/demo/index.html).
## Usage
### Installation
```
npm install --save @polymer/paper-button
```
### In an html file
```html
import '@polymer/paper-button/paper-button.js';
link
raised
toggles
disabled
```
### In a Polymer 3 element
```js
import {PolymerElement, html} from '@polymer/polymer';
import '@polymer/paper-button/paper-button.js';
class SampleElement extends PolymerElement {
static get template() {
return html`
link
raised
toggles
disabled
`;
}
}
customElements.define('sample-element', SampleElement);
```
## Contributing
If you want to send a PR to this element, here are
the instructions for running the tests and demo locally:
### Installation
```sh
git clone https://github.com/PolymerElements/paper-button
cd paper-button
npm install
npm install -g polymer-cli
```
### Running the demo locally
```sh
polymer serve --npm
open http://127.0.0.1:/demo/
```
### Running the tests
```sh
polymer test --npm
```