Icon

How to get Icon

import { Icon } from 'fds/components';

Type: Component

Renders an icon from the FontAwesome library. For more information, visit the https://fontawesome.com/v4.7.0/icons/

Props

# Name Type Description
1. [colorName] String

The name of the color to use in the component. FDS has implemented a color palette for all of the components implemented in the library.

When building a custom component, try to use the existing colors as much as possible. Try to find an FDS component which is similar to the component you're building. When using colors this way, you can guarantee your component will use the correct color when the style of the library updates.

The possible values can be found in the example.

  Default value
"icon-color"
  Related links
2. [icon] String

The name of the icon displayed in the component.

For more information about the available icon names, check the https://fontawesome.com/v4.7.0/icons/

3. [flipHorizontal] Boolean

Visually mirrors the icon horizontally.


  Default value
false
4. [flipVertical] Boolean

Visually mirrors the icon vertically.


  Default value
false
5. [tooltipContent] String | ReactElement

The content of the tooltip that is displayed when hovering over the whole component.

  • string: the textual content of the tooltip

  • ReactElement: a React Element (instance of a React Component, usually created with JSX)

  Default value
null
6. [size] String

The size of Icon to render. The possible values are:

  • 's'

  • 'm'

  • 'l'


  Default value
"s"

Related links