codogo-nav
Default navigation bar that hopefully actually works
Last updated 2 years ago by mcclowes .
MIT · Original npm · Tarball · package.json
$ cnpm install codogo-nav 
SYNC missed versions from official npm registry.

codogo-nav

npm version

A navigation bar component for React, than (hopefully) just works.


Example usage

Import component

    import { Nav, } from "codogo-nav";

A simple example:

    <Nav
        logo = { <Logo src = { akkrooLogo } /> }
        links = { [
            {
                as: "gatsby-link",
                to: "/",
                content: "Home",
            },
            {
                as: "a",
                to: "/form-stage-1/",
                content: "Stage 1",
            },
            {
                as: "router-link",
                to: "/form-stage-2/",
                content: "Stage 2",
            },
        ] }
    />

Links

codogo-nav links support the following components, selected via the "as" property via the following strings:

  • <a/> - "a"
  • "gatsby-link" - "gatsby-link"
  • <Link/> from "react-router-dom" - "link"
  • <NavLink/> from "react-router-dom" - "nav-link"
  • <div/> - "div"

Props

The follow props are used, defaults shown below:

const theme = {
    padding: {
        //
        xs: "0.75em",
        other: "1.5em",
    },
    color: {
        // Font color
        xs: "#fff",
        other: "#333",
    },
    highlightColor: {
        // Hover on links, burger menu
        xs: "#ddd",
        other: "#888",
    },
    backgroundColor: {
        xs: "#333",
        other: "#fff",
    },
    height: {
        xs: "50px",
        other: "70px",
    },
    font: "sans-serif",
    fontSize: {
        xs: "0.8em",
        other: "1.1em",
    },
    textTransform: {
        xs: "none",
        other: "none",
    },
    topOffset: {
        xs: "50px",
        other: "70px",
    },
    margin: {
        xs: "20px",
        other: "30px",
    },
    clear: false,
    fixed: false,
    shadow: false,
};

More complex examples



Current Tags

  • 2.4.1                                ...           latest (2 years ago)

33 Versions

  • 2.4.1                                ...           2 years ago
  • 2.4.0                                ...           2 years ago
  • 2.3.1                                ...           2 years ago
  • 2.3.0                                ...           2 years ago
  • 2.2.3                                ...           2 years ago
  • 2.2.2                                ...           2 years ago
  • 2.2.1                                ...           2 years ago
  • 2.1.4                                ...           2 years ago
  • 2.1.3                                ...           2 years ago
  • 2.1.2                                ...           2 years ago
  • 2.1.1                                ...           2 years ago
  • 2.1.0                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.0.15                                ...           2 years ago
  • 1.0.14                                ...           2 years ago
  • 1.0.13                                ...           2 years ago
  • 1.0.12                                ...           2 years ago
  • 1.0.11                                ...           2 years ago
  • 1.0.10                                ...           2 years ago
  • 1.0.9                                ...           2 years ago
  • 1.0.8                                ...           2 years ago
  • 1.0.7                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (7)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |