# @webapp-suite/elements.button-group

Latest version **0.10.0** (published 2021-10-20) · 0 weekly downloads

## Install

```sh
npm install @webapp-suite/elements.button-group
pnpm add @webapp-suite/elements.button-group
yarn add @webapp-suite/elements.button-group
bun add @webapp-suite/elements.button-group
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.10.0 |
| Published | 2021-10-20 |
| First published | 2021-03-13 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 11.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | kimigao |

## Links

- npm: https://www.npmjs.com/package/@webapp-suite/elements.button-group
- Repository: https://github.com/webapp-suite/elements
- Homepage: https://github.com/webapp-suite/elements#readme
- Issues: https://github.com/webapp-suite/elements/issues
- npm.io page: https://npm.io/package/@webapp-suite/elements.button-group

## Dependencies (1)

- [@webapp-suite/elements](https://npm.io/package/@webapp-suite/elements.md) ^0.10.0

## Recent versions

- 0.10.0 (latest) — 2021-10-20
- 0.9.0 — 2021-07-21
- 0.8.0 — 2021-06-21
- 0.7.0 — 2021-06-21
- 0.6.0 — 2021-06-17
- 0.5.0 — 2021-05-31
- 0.4.0 — 2021-05-04
- 0.3.1 — 2021-04-07
- 0.3.0 — 2021-04-05
- 0.2.0 — 2021-03-17
- 0.1.0 — 2021-03-13

## README

<h1 align="center">
    <a href="">
      <img alt="webapp-suite" src="https://webapp-suite.com/wp-content/themes/webapp-suite/img/brand/logo-black.png"/>
    </a>
</h1>

<h1 align="center">Elements - button-group</h1>

<p align="center">
  Part of the reusable webapp-suite UI Components as Web Components.
    <a href="https://webapp-suite.github.io/elements/?path=/story/ts-button-group--default">
      Demo
    </a>
</p>

<p align="center">
    <a href="https://www.npmjs.com/package/@webapp-suite/elements.button-group">
      <img alt="NPM Version" src="https://badgen.net/npm/v/@webapp-suite/elements.button-group" height="20"/>
    </a>
    <a href="https://npmcharts.com/compare/@webapp-suite/elements.button-group?minimal=true">
		  <img alt="Downloads per month" src="https://badgen.net/npm/dm/@webapp-suite/elements.button-group" height="20"/>
		</a>
		<a href="https://www.npmjs.com/browse/depended/@webapp-suite/elements.button-group">
		  <img alt="Dependent packages" src="https://badgen.net/npm/dependents/@webapp-suite/elements.button-group" height="20"/>
		</a>
</p>

<style>
  table {
      width:100%;
  }
</style>

## ➤ Properties

| Property | Attribute | Type | Default | Description |
| -------- | --------- | ---- | ------- | ----------- |
|          |           |      |         |             |

## ➤ Slots

| Name | Description |
| --- | --- |
| default | All \`ts-button\` elements in the group should be wrapped with \`ts-button-group\` element to be grouped together |

## ➤ How to use it

- Install the package of buttonGroup

```shell
$ npm i @webapp-suite/elements.button-group --save
```

- Import the component

```js
import '@webapp-suite/elements.button-group';
```

or

```html
<script src="node_modules/@webapp-suite/elements.button-group/lib/button-group.umd.js"></script>
```

- Use it like [demo]("https://webapp-suite.github.io/elements/?path=/story/ts-button-group--default")

- Our components rely on having the `Open Sans` available, You can see the `font-weight` and `font-style` you need to load [here](https://github.com/webapp-suite/elements/blob/master/packages/core/src/fonts.css), or you can just load it from our package (for now)

```html
<link rel="stylesheet" href="node_modules/@webapp-suite/elements/src/fonts.css" />
```

## ➤ Polyfills

For supporting IE11 you need to add couple of things

- Don't shim CSS Custom Properties in IE11

```html
<!-- Place this in the <head>, before the Web Component polyfills are loaded -->
<script>
	if (!window.Promise) {
		window.ShadyCSS = { nativeCss: true };
	}
</script>
```

##### You have two options for polyfills library:

1. Use [`@open-wc/polyfills-loader`](https://github.com/open-wc/open-wc/tree/master/packages/polyfills-loader)

- Installation

```shell
$ npm i @open-wc/polyfills-loader
```

- Load it

```js
import loadPolyfills from '@open-wc/polyfills-loader';

loadPolyfills().then(() => import('./my-app.js'));
```

2. Use [`@webcomponents/webcomponentsjs`](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs)

- Installation

```hell
$ npm i @webcomponents/webcomponentsjs --save
```

- Enable ES5 class-less Custom Elements

```html
<script src="/node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"></script>
```

- Load appropriate polyfills and shims with [`@webcomponents/webcomponentsjs`](https://github.com/webcomponents/webcomponentsjs)

```html
<script src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js" defer></script>
```

## ➤ How to contribute

Thanks for your interest and help!

- First thing you need to do is read this [[Component Checklist](https://github.com/webapp-suite/elements/wiki/Component-checklist)] which contains lots of important information about what you need to consider when you are creating/changing components

##### [General info](https://github.com/webapp-suite/elements/wiki/Useful-materials-starter)

You can find some [links to useful materials](https://github.com/webapp-suite/elements/wiki/Useful-materials-starter) about what we are using and some tutorials and articles that can help you get started.

## ➤ [Polyfill Limitations](https://github.com/webapp-suite/elements/wiki/Polyfill-Limitations)

You can see a list of limitations that we should watch out for, [here](https://github.com/webapp-suite/elements/wiki/Polyfill-Limitations)

## ➤ License

- You can always create forks on GitHub, submit Issues and Pull Requests.
- You can only use webapp-suite Elements to make apps on a webapp-suite platform, e.g. webapp-suite.com.
- You can fix a bug until the bugfix is deployed by webapp-suite.
- You can host webapp-suite Elements yourself.
- If you want to make a bigger change or just want to talk with us, reach out to our team here on GitHub.

You can read the full license agreement in the [LICENSE.md](https://github.com/webapp-suite/elements/blob/master/LICENSE.md).

---
_Source: https://npm.io/package/@webapp-suite/elements.button-group · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
