react-toolbox/components/link
Javi Velasco 0cb8d8bdb2 Get rid of jsx extensions 🔮 2016-04-10 21:23:04 +02:00
..
Link.js Get rid of jsx extensions 🔮 2016-04-10 21:23:04 +02:00
index.js Remove jsx extension from imports in components 2015-11-28 20:24:46 +01:00
readme.md Changed Icon Prop type to String or Element instead of Any. Also fixed an inappropriate example for checkbox. 2016-04-06 21:24:31 -04:00
style.scss Allow Link to render Tooltips via children prop 2016-01-05 23:32:38 +01:00

readme.md

Link

The link is a very simple component that acts mostly as a wrapper for the HTML anchor. It's not included in Material Design Specification but we provide it as an easy way to create links with icons and counters. Let's see an example:

import Link from 'react-toolbox/lib/link';

const LinksTest = () => (
  <nav>
    <Link active href="/#/components/link" label="Work" count={4} icon='business' />
    <Link href="/#/components/link" label="Blog" icon='speaker_notes' />
    <Link href="/#/components/link" label="Explore" icon='explore' />
  </nav>
);

Properties

You can add as many properties as you want to be directly transferred to the output anchor element. Apart from them you have the following properties:

Name Type Default Description
active Boolean false If true, adds active style to link.
className String '' Sets a custom class name to add styles to the link.
count Number Sets a count number.
icon String or Element An icon key string to include a FontIcon component in front of the text.
label String The text string used for the text content of the link.