All Projects → ntkme → Github Buttons

ntkme / Github Buttons

Licence: bsd-2-clause
Unofficial github:buttons.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Github Buttons

Wymaterialbutton
Interactive and fully animated Material Design button for iOS developers.
Stars: ✭ 80 (-90.26%)
Mutual labels:  component, button
React Native Really Awesome Button
React Native button component. Awesome Button is a 3D at 60fps, progress enabled, social ready, extendable, production ready component that renders an awesome animated set of UI buttons. 📱
Stars: ✭ 988 (+20.34%)
Mutual labels:  component, button
Bttn.css
Awesome buttons for awesome projects!
Stars: ✭ 2,004 (+144.09%)
Mutual labels:  button, frontend
San
A fast, portable, flexible JavaScript component framework
Stars: ✭ 4,514 (+449.82%)
Mutual labels:  component, frontend
Stimulus Autocomplete
Stimulus autocomplete component
Stars: ✭ 165 (-79.9%)
Mutual labels:  component, frontend
React Multi Select
A Multi Select component built with and for React
Stars: ✭ 111 (-86.48%)
Mutual labels:  component, frontend
React Awesome Button
React button component. Awesome button is a 3D UI, progress, social and share enabled, animated at 60fps, light weight, performant, production ready react UI button component. 🖥️ 📱
Stars: ✭ 943 (+14.86%)
Mutual labels:  component, button
Reactpatterns
Patterns for React Developers
Stars: ✭ 1,682 (+104.87%)
Mutual labels:  component, frontend
React Native Platform Touchable
A wrapper around the various Touchable* components built into React Native core with platform defaults
Stars: ✭ 440 (-46.41%)
Mutual labels:  component, button
React Progress Button
🌀 Simple react.js component for an inline progress indicator
Stars: ✭ 516 (-37.15%)
Mutual labels:  component, button
Goplayspace
Advanced Go Playground frontend written in Go, with syntax highlighting, turtle graphics mode, and more
Stars: ✭ 765 (-6.82%)
Mutual labels:  frontend
Snapchat Clone
👻 A SnapChat clone built with React, Redux and Typescript. Styled with SASS. Tested with Cypress, Jest and Enzyme. Linted with Eslint and formatted with Prettier!
Stars: ✭ 770 (-6.21%)
Mutual labels:  frontend
Canvas Datagrid
Canvas based data grid web component. Capable of displaying millions of contiguous hierarchical rows and columns without paging or loading, on a single canvas element.
Stars: ✭ 798 (-2.8%)
Mutual labels:  component
Min Cli
Min 小程序组件化解决方案
Stars: ✭ 807 (-1.71%)
Mutual labels:  component
Front End Career
A career guide to Front End Developers
Stars: ✭ 765 (-6.82%)
Mutual labels:  frontend
Computer Science
Contains the basic fundamental data structures and algorithms a front end engineer should know, written all in JavaScript.
Stars: ✭ 798 (-2.8%)
Mutual labels:  frontend
Multityperecyclerviewadapter
一个专注于RecyclerView优雅刷新(接管资源和数据源)、高灵活、低耦合、健壮性以及高效性的MVP模式库,支持大多数Adapter
Stars: ✭ 763 (-7.06%)
Mutual labels:  component
Embetty
🐙 Embetty displays remote content like tweets or YouTube videos without compromising your privacy.
Stars: ✭ 759 (-7.55%)
Mutual labels:  frontend
Frontend
Kottans frontend course 🎓
Stars: ✭ 749 (-8.77%)
Mutual labels:  frontend
Zarm
基于 React、React-Native 的移动端UI组件库
Stars: ✭ 816 (-0.61%)
Mutual labels:  frontend

github-buttons

build Coverage Status npm

Usage

Use as a Snippet

Get started quickly with github:button configurator.

Use as a Component

Use as a Module

import { render } from 'github-buttons'

// export function render(options: object, callback: (el: HTMLElement) => void): void;
render(options, function (el) {
  document.body.appendChild(el) 
})

// export function render(anchor: HTMLAnchorElement, callback: (el: HTMLElement) => void): void;
render(anchor, function (el) {
  anchor.parentNode.replaceChild(el, anchor)
})

Options

  • For snippet usage, an option is an attribute on <a> element.
  • For component usage, an option is a prop on component.
  • For module usage, an option is a property on options object.
href
  • Type: string
  • Default: '#'

Assign href attribute (GitHub link) for button.

title
  • Type: string
  • Default: undefined

Assign title attribute for button.

data-icon
  • Type: string
  • Default: 'octicon-mark-github'

Set icon on button. A subset of Octicons is bundled.

data-color-scheme
  • Type: string
  • Default: undefined

Define a mapping of system color scheme to widget color scheme in css-like syntax.

This is an opt-in feature since version >=2.3.0. It means if data-color-scheme is undefined, it would still behave like version <2.3.0, where light color scheme is used under all conditions.

Once data-color-scheme is set to a string, it will inherit the default mapping: no-preference: light; light: light; dark: dark;.

  • no-preference: light; means when system has no preference on color scheme, light color scheme will be used.
  • light: light; means when system prefers light color scheme, light color scheme will be used.
  • dark: dark; means when system prefers dark color scheme, dark color scheme will be used.

User declarations would override the default. For example:

  • To enable color scheme using default, set data-color-scheme="".
  • To use dark color scheme when system has no preference, set data-color-scheme="no-preference: dark;".
  • To force light color scheme everywhere, set data-color-scheme="dark: light;".
  • To force dark color scheme everywhere, set data-color-scheme="no-preference: dark; light: dark;".

A single word can be used to force the color scheme everywhere since version >=2.11.0. For example:

  • To force light color scheme everywhere, set data-color-scheme="light".
  • To force dark color scheme everywhere, set data-color-scheme="dark".
data-size
  • Type: string
  • Default: undefined

Set button size. Possible values are undefined and 'large'.

data-show-count
  • Type: boolean
  • Default: false

Show a dynamic count based on button type (detected from href):

  • https://github.com/:user (follow)
  • https://github.com/:user/:repo (star)
  • https://github.com/:user/:repo/subscription (watch)
  • https://github.com/:user/:repo/fork (fork)
  • https://github.com/:user/:repo/issues (issues)
  • https://github.com/:user/:repo/issues/new (issues)

Tailing slash, query string, and hash in the href won't affect type detection:

  • https://github.com/:user/ (follow)
  • https://github.com/:user?tab=repositories (follow)
  • https://github.com/:user/:repo#readme (star)
  • https://github.com/:user/:repo/#readme (star)
data-text
  • Type: string
  • Default: undefined

Set button text. When button is generated from <a> element and data-text is undefined, the button text will be anchor's textContent.

aria-label
  • Type: string
  • Default: undefined

Set aira-label for button.


See also


License

See LICENSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].