@ludum-dare-badges/react
v2.1.4
Published
React bindings for ludum-dare-badges
Downloads
3
Readme
@ludum-dare-badges/react
Display Ludum Dare Game Jam results in React.
Note: This project is community made and not endorsed by the offical Ludum Dare creator(s).
Installation
Yarn
yarn add @ludum-dare-badges/react
npm
npm install @ludum-dare-badges/react
Usage
import React from 'react'
import Widget from '@ludum-dare-badges/react'
const App = () => (
<Widget game="44/alien-e-x-p-a-n-s-i-o-n" />
)
Simply add the game widget to the React application using JSX.
The React component will simply call @ludum-dare-badges/api to obtain the results badge.
Props
Game
The namespace of the game on the ldjam site Required
game
requires both the Ludum Dare number and the game title (eg. 44/alien-e-x-p-a-n-s-i-o-n
for Ludum Dare 44)
Type
The image format type to display the badge as. Default: svg
Can be either svg
or png
.
svg
is recommended for better font rendering.
Type
The host of the API. Default: https://badges.jaxs.onl
Likely only set in the case that the API is self-hosted.