@heroku/react-malibu

5.0.2 • Public • Published

react-malibu

React components for using the Malibu SVG spritesheet.

Travis npm package

JavaScript Style Guide

Setup

  1. yarn add @heroku/react-malibu
  2. Make sure that the purple3 stylesheet is included in your website, or the fills will not work.
  3. import { MalibuSprites, MalibuIcon } from '@heroku/react-malibu'
  4. Profit!

Development

Clone the repo, then yarn install. If you want to see the demo server, run yarn start and visit http://localhost:3000 to browse the icons.

You cannot currently publish to NPM using yarn, because there are bugs.

See more in CONTRIBUTING.md.

Usage

This package offers two components: <MalibuSprites> and <MalibuIcon>.

<MalibuSprites>

Put this component on your page only once, it fetches and displays the entire spritesheet.

By default this will load the product sprites. To load the marketing sprites, add the set property.

<MalibuSprites set='marketing'/>

<MalibuIcon>

Use this component to instantiate an icon.

<MalibuIcon name='add-badge-16' size={20} fillClass='dark-gray' style={'position': 'fixed'} extraClasses='foo bar baz'/>
Properties
  • name (required): the name of the icon. See the full list at https://hk-malibu.herokuapp.com/.
  • size (default: undefined): the desired rendering size in pixels. Note that most icons come in -16 and -28 pixel variants. Choose the appropriate variant for the scale you wish to render at — for example, if you're rendering an icon at 12px, use the -16 icon as the base and 12 as the size. If you do not specify a size, the icon's native size will be used.
  • fillClass (default: purple): the desired icon fill. Must be one of
    • purple
    • dark-gray
    • red
    • orange
    • green
    • blue
  • style (optional): an object containing style definitions to apply to the rendered <svg> element.
  • extraClasses (optional): a string containing space-separated classnames to apply to the rendered <svg> element.

Readme

Keywords

Package Sidebar

Install

npm i @heroku/react-malibu

Weekly Downloads

172

Version

5.0.2

License

SEE LICENSE IN LICENSE.txt

Unpacked Size

20.8 kB

Total Files

9

Last publish

Collaborators

  • sfalan
  • hillzbot2000
  • kdreyeroren
  • rcross
  • lsorstokke
  • sudarshanhiray
  • alex_heroku
  • rajashri-gurusamy
  • mandeepsf
  • mingzhi-liu1258
  • beanieboi
  • csinghaus-sfdc
  • dougmcinnes-sfdc
  • beckychen
  • dasofiei
  • xx-sfdc-npm
  • kpremkumar
  • stessema-sfc
  • chap-heroku
  • dhammer25
  • ndavidson-sf
  • umarsfdc
  • amandadolansf
  • cdwort-sfdc
  • apoorvasriv
  • michellejhlim
  • jhili!16
  • apadala
  • cmcclung-npm-salesforce.com
  • rstiltonsf
  • tlowrimore
  • rchanda
  • abhinavkoul
  • daniel.bright
  • jonnymac
  • justinwilaby-sf
  • cv88
  • aaronromeosfdc
  • tenharmsel_sf
  • ekozilforce
  • coreypurcell_salesforce
  • jmonreal
  • sconklin
  • suppada
  • gnetter
  • tkoh-sfdc
  • jasoncummings-heroku
  • diana.doherty.sfdc
  • joeybrown90sf
  • rsoerensen
  • ademusoyo
  • lsangalang2023
  • ccasey
  • ryanbrainard
  • marcelsfdc
  • nrisaro
  • chetankd10
  • kscarey
  • bemory-heroku
  • revativelagada
  • brock-salesforce
  • jmorrell-sfdc
  • bencdenton
  • rafaydin
  • dhagberg-sf
  • elzoona
  • cmarcojos
  • adirasanam
  • kbaird-sf
  • bhawnaheroku
  • jondaniel-sfdc
  • gkommineni
  • p.shreya
  • sai_harshitha_neela
  • ktsforce
  • hkii
  • heroku-front-end
  • vammundra
  • the7oka
  • vlazuka
  • grismar17
  • lucaszhou
  • mars
  • ashher.khan
  • nlanatta
  • pranamsharma
  • nrenke
  • richatiwari
  • psalim
  • wchrisjohnson
  • agatpareek
  • swapnilghose
  • mgates-salesforce
  • ryoneyama
  • sripad.kulkarni
  • anujpandey001
  • dboston528
  • adirksmeier
  • christopher.jose
  • cbaxtersf
  • mttr
  • tetsuya_
  • daebumlee
  • msamineni
  • srishtigautam
  • bsperlingsf
  • pbomma
  • lalitreddy
  • zli-sf
  • sbaner18
  • joanneyeung
  • paguilar
  • bleong
  • montes_heroku
  • pfuente
  • saikrishna0202
  • jwadsworthsf
  • jheikes
  • mimen
  • daigo-heroku
  • mpeck
  • jmccartie
  • jordaneekey
  • lmckenzie
  • v.anand
  • barma.jahnavi
  • araja
  • sarassassin
  • reidmix
  • mbuschheroku
  • k.plenty
  • eblack
  • sheax0r
  • k80bowman
  • rdagg-hero
  • grundy.g
  • robinson.m
  • tcareysmith-sfdc
  • ptemporini
  • paulaprado18
  • harish.457
  • jsullivandigs
  • ssherbondy77
  • marcusblankenship
  • ntonollier
  • eleary
  • salesforce-releases