Skip to content

BitcoinBeachTravemuende/bitcoin-logo-webcomponent

Repository files navigation

<bitcoin-logo />

(Official) Bitcoin logo provided as Web Component. It based on the original graphic promoted by bitboy in 2010 as described by Bitcoin Design here.

The SVG itself is friendly borrowed from Bitcoin Design (source).

Few variants

bitcoin-logo-webcomponent

Features

  • Customize size and colors as you like
  • SVG based
  • No dependencies
  • Small bundle size: 3.26 kB │ gzip: 1.63 kB
  • Supported by modern browsers
  • Use it with your favourite web framework

Usage

Installation

Use your favourite Node package manager to install bitcoin-logo web component.

npm

npm install @bitcoinbeachtravemuende/bitcoin-logo

bun

bun add @bitcoinbeachtravemuende/bitcoin-logo

pnpm

pnpm add @bitcoinbeachtravemuende/bitcoin-logo

yarn

yarn add @bitcoinbeachtravemuende/bitcoin-logo

Use bundle via unpkg

TBD

Properties

  • size: string: Valid size value in px, % or em. For example: size="300px", size="50%" or size="300px"
  • background-color: string: Background color. Value can be either a valid color name or a hex color, eg. bgColor="white" or bgColor="#FFF"
  • color: string: Color of the capital . Value can be either a valid color name or a hex color, eg. color="black" or color="#000"

Examples

Default

<bitcoin-logo />

Custom colors

<bitcoin-logo color="white" background-color="black"></bitcoin-logo>

All custom values

<bitcoin-logo size="300px" background-color="black" color="white"></bitcoin-logo>

Build

Requirements

Nix

Install Nix

Other

Install pnpm or any other Node package manager (bun, npm, yarn or whatever)

Local build

  • Install dependencies (command might be different for other package manager)
pnpm install
  • Local build
pnpm dev

Open http://localhost:5173

  • Release build
pnpm build

Build sources land into dist folder.

License

MIT