icon

v4.15.0arrow_drop_down
v4.15.0
STATUS
Passing
DOWNLOADS
788
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
N/A
This implementation is a remix of the Icon component in Blueprintjs:
1 contributor
Install icon as a package?
Copied
npm i @bit/segmentio.evergreen.icon
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
chevron_left
chevron_right
Icon ()

This implementation is a remix of the Icon component in Blueprintjs: https://github.com/palantir/blueprint/blob/813e93f2/packages/core/src/components/icon/icon.tsx#L15 Refer to the LICENSE for BlueprintJS here: https://github.com/palantir/blueprint/blob/develop/LICENSE

Properties
NameTypeDefault valueDescription
color
string'currentColor'

Color of icon. Equivalent to setting CSS fill property.

icon
(required)
string

Name of a Blueprint UI icon, or an icon element, to render. This prop is required because it determines the content of the component, but it can be explicitly set to falsy values to render nothing.

  • If null or undefined or false, this component will render nothing.
  • If given an IconName (a string literal union of all icon names), that icon will be rendered as an <svg> with <path> tags.
  • If given a JSX.Element, that element will be rendered and all other props on this component are ignored. This type is supported to simplify usage of this component in other Blueprint components. As a consumer, you should never use <Icon icon={<element />} directly; simply render <element /> instead.
size
number16

Size of the icon, in pixels. Blueprint contains 16px and 20px SVG icon images, and chooses the appropriate resolution based on this prop.

title
string

Description string. Browsers usually render this as a tooltip on hover, whereas screen readers will use it for aural feedback. By default, this is set to the icon’s name for accessibility.

style
object

CSS style properties.

theme
(required)
object

Theme provided by ThemeProvider.

Help and resources