# @vlalg-nimbus/github-stars-button

> A button that shows the number of stars of a Github repository

Latest version **2.0.1** (published 2024-11-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @vlalg-nimbus/github-stars-button
pnpm add @vlalg-nimbus/github-stars-button
yarn add @vlalg-nimbus/github-stars-button
bun add @vlalg-nimbus/github-stars-button
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; no types.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2024-11-19 |
| First published | 2024-11-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 22 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Antonio and Felipe |
| Maintainers | tonhaosantos |
| Keywords | module, lib, web, component, web component, html, css, js, github, github star, github stars |

## Links

- npm: https://www.npmjs.com/package/@vlalg-nimbus/github-stars-button
- Repository: https://github.com/VemLavarALoucaGamers/vlalg-nimbus
- Homepage: https://nimbus.tec.br
- Issues: https://github.com/VemLavarALoucaGamers/vlalg-nimbus/issues
- npm.io page: https://npm.io/package/@vlalg-nimbus/github-stars-button

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 2.0.1 (latest) — 2024-11-19
- 2.0.0 — 2024-11-19
- 1.0.3 — 2024-11-19
- 1.0.2 — 2024-11-19
- 1.0.1 — 2024-11-19
- 1.0.0 — 2024-11-19

## README

# github-stars-button

<br />

This is a Github Stars Web Component for Frontend Projects.

## Installation

##### CDN

```js [Unpkg JS]
  https://unpkg.com/@vlalg-nimbus/github-stars-button/dist/github-stars-button.min.umd.js
```

##### To install

```bash
npm install @vlalg-nimbus/github-stars-button

# or

yarn add @vlalg-nimbus/github-stars-button
```

## Usage

```js
<head>
  <script type="module" src="https://unpkg.com/@vlalg-nimbus/github-stars-button/dist/github-stars-button.min.umd.js"></script>
</head>
<body>
  <github-stars-button
    data-repo-owner="repo owner"
    data-repo-name="repo name"
    data-show-count="true"
    data-go-repo="true"
  >
  </github-stars-button>

  <script>
    const githubStarsButton = document.querySelector('github-stars-button')

    githubStarsButton.addEventListener('webcomp-clicked', function(event) {
      const repoOwner = this.dataset.repoOwner
      const repoName = this.dataset.repoName
      const showCount = this.dataset.showCount

      console.log('Here', repoOwner, repoName, showCount)
      console.log('Custom event triggered:', event.detail.message)
    })
  </script>
</body>
```

## Components list

The components that are part of this lib are:

- <a href="http://nimbus.tec.br/web-components/github-stars-button" target="_blank">github-stars-button</a>

Click on each one above to find out how to use it, properties, events, etc.

## License

[MIT](http://opensource.org/licenses/MIT)

---
_Source: https://npm.io/package/@vlalg-nimbus/github-stars-button · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
