0.1.13 • Published 6 years ago

overwatch-side-nav v0.1.13

Weekly downloads
18
License
Apache-2.0
Repository
github
Last release
6 years ago

overwatch-side-nav

Build Status Coverage Status

npm Version npm Downloads license

A React component modeling the Official Overwatch website side-navigation.

Example

Install

npm install --save overwatch-side-nav

Fonts

Futura No 2 D DemiBold

This font is used by Activision Blizzard for much of Overwatch's design. For this component to match the Overwatch design, including the font is required. It can be licensed from MyFonts.

When using CSS font-face, the font-family should match whats below:

font-family: 'Futura No 2 D DemiBold';

Usage

Check out example/index.js for working example or below for exact usage.

import SideNav from 'overwatch-side-nav'

import SVG_MATERIAL_CHEVRON from 'svg-icon/dist/svg/material/chevron-left.svg'

const items = [
    {
        label: 'Home',
        id: 'top',
        icon: SVG_MATERIAL_CHEVRON,
    },
    {
        label: 'Highlights',
        id: 'potg',
        icon: SVG_MATERIAL_CHEVRON,
    },
    {
        label: 'Settings',
        id: 'settings',
        icon: SVG_MATERIAL_CHEVRON,
    },
]

class Example extends React.Component {

    render() {    
        return <SideNav
            items={items}
        />
    }
}

Props

namerequiredtypedefaultdesc
itemsXarraynullArray of objects, with required keys id, label, and icon
 item.labelXstringnullLabel for the navigation item, displayed in uppercase
 item.idXstringnullHTML id for the navigation item. The item will be shown as active when id is same as window.location.hash
 item.iconX<svg>nullIcon for the navigation, positioned to the left of the label. Must be a valid SVG
defaultColorstring#323C50Background color for navigation items that aren't active. Should visually contrast textColor
activeColorstring#FFFFFFBackground color for the active navigation item
textColorstring#00C3FFColor for the navigation items' label and the fill color for the icon SVG
zIndexnumber1000000CSS z-index for the navigation. Used with position: fixed, to float SideNav above (or below) the page

Development

npm run dev

Running the example

Install it:

cd example/; npm install

Run it while developing (in another terminal window):

cd example/; npm run dev

Open http://localhost:8080/ to see the running example

Tests

npm test

License

Made with 🍊 by Chris Dolphin

license

Fonts

The font Futura No 2 D DemiBold should be licensed through MyFonts.com

Related

  • awesome-overwatch - A curated list of official Overwatch links and community github repos, codepen demos, and chrome extensions.
  • overwatch-settings-select - A React component modeling the Overwatch Settings select element.
  • overwatch-settings-stepper - A React component modeling the Overwatch Settings the stepper and toggle UI elements.
  • overwatch-table - A React component modeling the Overwatch custom game table element.
  • dva-heart-emote - A WebGL remake of the heart container animation from D.Va's emote.
0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago