@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

74

Version

5.0.2

License

SEE LICENSE IN LICENSE.txt

Unpacked Size

20.8 kB

Total Files

9

Last publish

Collaborators

  • srishtigautam
  • aklimaite
  • jsullivandigs
  • julianduque-sfdc
  • cwallsf
  • msamineni
  • jeffrey.estrada
  • dlira-sf
  • ntonollier
  • daebumlee
  • tetsuya_
  • mttr
  • eleary
  • salesforce-releases
  • bhawnaheroku
  • revativelagada
  • dboston528
  • anujpandey001
  • sripad.kulkarni
  • bemory-heroku
  • chetankd10
  • rafaydin
  • kbaird-sf
  • kscarey
  • cbaxtersf
  • ryoneyama
  • adirasanam
  • mengxiao.zhao
  • nrisaro
  • cmarcojos
  • adirksmeier
  • mgates-salesforce
  • ademusoyo
  • elzoona
  • christopher.jose
  • jondaniel-sfdc
  • dhagberg-sf
  • bencdenton
  • lsangalang2023
  • marcelsfdc
  • ccasey
  • joeybrown90sf
  • suppada
  • diana.doherty.sfdc
  • ryanbrainard
  • rsoerensen
  • jasoncummings-heroku
  • sconklin
  • brock-salesforce
  • tkoh-sfdc
  • gnetter
  • coreypurcell_salesforce
  • swapnilghose
  • stessema-sfc
  • jmonreal
  • brittany.jones
  • nnaidu9
  • rstiltonsf
  • nilamuthu
  • sghaffar
  • cdwort-sfdc
  • agatpareek
  • aaronromeosfdc
  • kpremkumar
  • rchanda
  • 7ftz
  • xx-sfdc-npm
  • cv88
  • ekozilforce
  • umarsfdc
  • beanieboi
  • ndavidson-sf
  • mingzhi-liu1258
  • angelcampbell
  • mandeepsf
  • yann_ck
  • dasofiei
  • rajashri-gurusamy
  • sudarshanhiray
  • alex_heroku
  • sbosio_sf
  • sarahoh2468
  • justinwilaby-sf
  • cmcclung-npm-salesforce.com
  • tlowrimore
  • jonnymac
  • vish_heroku
  • harish.457
  • paulaprado18
  • ptemporini
  • tcareysmith-sfdc
  • robinson.m
  • grundy.g
  • dkabanov1
  • cgfuh
  • rdagg-hero
  • k80bowman
  • sheax0r
  • dpark.heroku
  • afraidknot
  • daniel.bright
  • jdowning
  • abhinavkoul
  • joshwlewis-sfdc
  • viniljain
  • eblack
  • k.plenty
  • apadala
  • jhili!16
  • lsorstokke
  • rcross
  • kdreyeroren
  • dhammer25
  • tenharmsel_sf
  • dougmcinnes-sfdc
  • hillzbot2000
  • chap-heroku
  • michellejhlim
  • mbuschheroku
  • reidmix
  • beckychen
  • smrutisamanta
  • apoorvasriv
  • sfalan
  • p.shreya
  • sai_harshitha_neela
  • nlanatta
  • vammundra
  • dreichenberg
  • kamakshinagar
  • vlazuka
  • mars
  • heroku-front-end
  • richatiwari
  • wchrisjohnson
  • the7oka
  • simonebonettisfita
  • lucaszhou
  • psalim
  • nrenke
  • taylor.jones
  • angelayoung
  • mble-sfdc-2
  • ktsforce
  • hkii
  • kerry-bennett
  • pranamsharma
  • sfjonnpm
  • cory.steele
  • gkommineni
  • kmichalskis
  • smuku
  • ykatz
  • dgallegossfdc
  • dzuelke-sfdc
  • rishabh.wason
  • sarassassin
  • araja
  • v.anand
  • lmckenzie
  • jordaneekey
  • jmccartie
  • daigo-heroku
  • mimen
  • jheikes
  • jwadsworthsf
  • saikrishna0202
  • pfuente
  • montes_heroku
  • bleong
  • paguilar
  • joanneyeung
  • sbaner18
  • zli-sf
  • lalitreddy
  • pbomma
  • marcusblankenship
  • sruthich
  • mgomes-heroku
  • jesse.brown-sf
  • tij005
  • tholschuh-salesforce