4.8.1 • Published 3 years ago

@workday/canvas-kit-react-icon v4.8.1

Weekly downloads
3,349
License
Apache-2.0
Repository
-
Last release
3 years ago

Canvas Kit Icon

Components assisting the rendering of Canvas accent, applet, and system icons.

A Workday asset package must be used with these components. No icons are bundled with this package.

To browse a full list of icons, take a look at the Canvas Design System resources page.

Installation

yarn add @workday/canvas-kit-react

or

yarn add @workday/canvas-kit-react-icon

Design Assets

Install one of the following icon packages:

@workday/canvas-accent-icons-web
@workday/canvas-applet-icons-web
@workday/canvas-system-icons-web

Accent Icons

Usage

Use with @workday/canvas-accent-icons-web.

import { colors } from '@workday/canvas-kit-react-core'
import { AccentIcon } from '@workday/canvas-kit-react-icon'
import { shieldIcon } from '@workday/canvas-accent-icons-web'

<AccentIcon icon={shieldIcon} />
<AccentIcon icon={shieldIcon} color={colors.pomegranate500} />
<AccentIcon icon={shieldIcon} size={80} />

Static Properties

None

Component Props

Required

icon: CanvasIcon

Icon to display from @workday/canvas-accent-icons-web.

Optional

color: string

Icon color from @workday/canvas-colors-web.

Default: colors.blueberry500


size: number

Size of the icon.

Default: 56


transparent: boolean

Toggle for transparent accent icon background. If false, the background fill will be white.

Default: false


Applet Icons

Usage

Use with @workday/canvas-applet-icons-web.

import { AppletIcon } from '@workday/canvas-kit-react-icon'
import { benefitsIcon } from '@workday/canvas-applet-icons-web'

<AppletIcon icon={benefitsIcon} />
<AppletIcon icon={benefitsIcon} color={AppletIcon.Colors.Pomegranate} />
<AppletIcon icon={benefitsIcon} size={60} />

Static Properties

Colors: BrandingColors

An enum of the various Canvas hues (Pomegranate, Blueberry, Cinnamon, etc.).

<AppletIcon icon={benefitsIcon} color={AppletIcon.Colors.Pomegranate} />
  • Cinnamon
  • Peach
  • ChiliMango
  • Cantaloupe
  • SourLemon
  • JuicyPear
  • Kiwi
  • GreenApple
  • Watermelon
  • Jewel
  • Toothpaste
  • Blueberry
  • Plum
  • BerrySmoothie
  • Blackberry
  • IslandPunch
  • GrapeSoda
  • Pomegranate
  • FruitPunch
  • RootBeer
  • ToastedMarshmallow
  • Cappuccino
  • Licorice
  • BlackPepper

Component Props

Required

icon: CanvasIcon

Icon to display from @workday/canvas-applet-icons-web.

Optional

color: AppletIcon.Colors

Icon color hue. Must use a member of the AppletIcon.Colors static enum.

Default: AppletIcon.Colors.Blueberry


size: number

Size of the icon in px.

Default: 92


System Icons

Usage

Use with @workday/canvas-system-icons-web.

import { colors } from '@workday/canvas-kit-react-core'
import { SystemIcon } from '@workday/canvas-kit-react-icon'
import { activityStreamIcon } from '@workday/canvas-system-icons-web'

<SystemIcon icon={activityStreamIcon} />
<SystemIcon icon={activityStreamIcon} color={colors.blueberry500} />
<SystemIcon
  icon={activityStreamIcon}
  accent={colors.frenchVanilla100}
  fill={colors.blueberry500}
  background={colors.blueberry500}
/>
<SystemIcon icon={activityStreamIcon} size={48} />

Static Properties

None

Component Props

Required

icon: CanvasIcon

Icon to display from @workday/canvas-system-icons-web

Optional

size: number

Size of the icon in px.

Default: 24


color: string

Icon color. This will define accent and fill. accent and fill will override this property if defined.

Default: colors.primary.iconStandard


colorHover: string

Hover color of the icon. This will define accentHover and fillHover.

Default: colors.primary.iconHover


accent: string

.wd-icon-accent color. This will override color.


accentHover: string

.wd-icon-accent color on hover. This will override colorHover.


background: string

.wd-icon-background color.

Default: 'transparent'


backgroundHover: string

.wd-icon-background color on hover.

Default: 'transparent'


fill: string

.wd-icon-fill color. This will override color.


fillHover: string

.wd-icon-fill color on hover. This will override colorHover.


System Icon Circle

A system icon with a colored circular background. Icon color will be determined based on contrast against the background color provided.

Usage

Use with @workday/canvas-accent-icons-web.

import { colors } from '@workday/canvas-kit-react-core'
import { SystemIconCircle } from '@workday/canvas-kit-react-icon'
import { shieldIcon } from '@workday/canvas-accent-icons-web'

<SystemIconCircle icon={shieldIcon} />
<SystemIconCircle icon={shieldIcon} background={colors.pomegranate500} />

Static Properties

None

Component Props

Required

icon: CanvasIcon

Icon to display from @workday/canvas-accent-icons-web.

Optional

background: string

Background color from @workday/canvas-colors-web.

Default: colors.soap300


size: SystemIconCircleSize | number

Size of the icon.

Default: SystemIconCircleSize.l (40)


Graphics

Usage

Use with @workday/canvas-graphics-web.

import { colors } from '@workday/canvas-kit-react-core'
import { Graphic } from '@workday/canvas-kit-react-icon'
import { badgeAchievementGraphic } from '@workday/canvas-graphics-web'

<Graphic src={badgeAchievementGraphic} />
<Graphic src={badgeAchievementGraphic} width={80}/>
<Graphic src={badgeAchievementGraphic} height={80}/>
<Graphic src={badgeAchievementGraphic} grow={true} />

Static Properties

Size: SystemIconCircleSize

The size of the circle background. The icon will scale to fit.

SizePixels
xs16
s24
m32
l40
xl64
xxl120

Component Props

Required

src: CanvasGraphic

Graphic to display from @workday/canvas-graphics-web

Optional

width: number | string

Graphic width in px. width takes precedence over height in order to preserve the graphic's ratio.

Default: width of graphic


height: number | string

Graphic height in px. If set, width will be set to 100%.

Default: height of graphic


grow: boolean

Expand graphic to fit container. grow takes precedence over both width and height.

Default: false

4.8.3

3 years ago

4.8.2

3 years ago

4.8.1

3 years ago

4.8.0

3 years ago

4.7.1-next.18

3 years ago

4.7.1-next.14

3 years ago

4.7.1-next.15

3 years ago

4.7.1-next.16

3 years ago

4.7.1-next.0

3 years ago

4.7.1-next.1

3 years ago

4.7.1-next.2

3 years ago

4.7.1-next.3

3 years ago

4.7.1-next.4

3 years ago

4.7.1-next.5

3 years ago

4.7.1-next.6

3 years ago

4.7.1-next.7

3 years ago

4.7.1-next.8

3 years ago

4.7.1-next.9

3 years ago

4.7.1-next.10

3 years ago

4.7.1-next.11

3 years ago

4.7.1-next.12

3 years ago

4.7.0

3 years ago

4.6.1-next.3

3 years ago

4.6.1-next.2

3 years ago

4.6.1-next.1

3 years ago

4.6.0

3 years ago

4.5.2-next.3

3 years ago

4.5.2-next.1

3 years ago

4.5.2-next.2

3 years ago

4.5.2-next.0

3 years ago

4.5.1

3 years ago

4.5.1-next.4

3 years ago

4.5.1-next.3

3 years ago

4.5.1-next.2

3 years ago

4.5.1-next.1

3 years ago

4.5.1-next.0

3 years ago

4.5.0

3 years ago

4.4.3-next.15

3 years ago

4.4.3-next.17

3 years ago

4.4.3-next.16

3 years ago

4.4.3-next.18

3 years ago

4.4.3-next.14

3 years ago

4.4.3-next.13

3 years ago

4.4.3-next.12

3 years ago

4.4.3-next.11

3 years ago

5.0.0-beta.0

3 years ago

4.4.3-next.10

3 years ago

4.4.3-next.9

3 years ago

4.4.3-next.8

3 years ago

4.4.3-next.7

3 years ago

4.4.3-next.6

3 years ago

4.4.3-next.5

3 years ago

4.4.3-next.4

3 years ago

4.4.3-next.3

3 years ago

4.4.3-next.0

3 years ago

4.4.3-next.1

3 years ago

4.4.2

3 years ago

4.4.2-next.4

3 years ago

4.4.2-next.3

3 years ago

4.4.2-next.2

3 years ago

4.4.1-next.4

3 years ago

4.4.1

3 years ago

4.4.1-next.3

3 years ago

4.4.1-next.2

3 years ago

4.4.1-next.0

3 years ago

4.4.1-next.1

3 years ago

4.4.0

3 years ago

4.3.2-next.6

3 years ago

4.3.2-next.4

3 years ago

4.3.2-next.3

3 years ago

4.3.2-next.5

3 years ago

4.3.2-next.2

3 years ago

4.3.2-next.1

3 years ago

4.3.2-next.0

3 years ago

4.3.1

4 years ago

4.3.1-next.4

4 years ago

4.3.1-next.2

4 years ago

4.3.1-next.3

4 years ago

4.3.1-next.1

4 years ago

4.3.1-next.0

4 years ago

4.3.0

4 years ago

4.1.3-next.28

4 years ago

4.1.3-next.27

4 years ago

4.1.3-next.26

4 years ago

4.1.3-next.25

4 years ago

4.1.3-next.24

4 years ago

4.1.3-next.23

4 years ago

4.1.3-next.22

4 years ago

4.1.3-next.20

4 years ago

4.1.3-next.21

4 years ago

4.1.3-next.17

4 years ago

4.1.3-next.18

4 years ago

4.1.3-next.16

4 years ago

4.2.0

4 years ago

4.1.3-next.13

4 years ago

4.1.3-next.10

4 years ago

4.1.3-next.11

4 years ago

4.1.3-next.12

4 years ago

4.1.3-next.8

4 years ago

4.1.3-next.9

4 years ago

4.1.3-next.6

4 years ago

4.1.3-next.7

4 years ago

4.1.3-next.4

4 years ago

4.1.3-next.3

4 years ago

4.1.3-next.0

4 years ago

4.1.3-next.1

4 years ago

4.1.2

4 years ago

4.0.3

4 years ago

4.1.2-next.0

4 years ago

4.0.2

4 years ago

4.1.1

4 years ago

4.1.1-next.5

4 years ago

4.1.1-next.4

4 years ago

4.1.1-next.3

4 years ago

4.1.1-next.0

4 years ago

4.1.1-next.2

4 years ago

4.0.1-next.19

4 years ago

4.0.1-next.18

4 years ago

4.1.0

4 years ago

4.0.1-next.17

4 years ago

4.0.1-next.16

4 years ago

4.0.1-next.15

4 years ago

4.0.1-next.14

4 years ago

4.0.1

4 years ago

3.9.1

4 years ago

4.0.1-next.12

4 years ago

4.0.1-next.11

4 years ago

4.0.1-next.9

4 years ago

4.0.1-next.10

4 years ago

4.0.1-next.8

4 years ago

4.0.1-next.7

4 years ago

4.0.1-next.6

4 years ago

4.0.1-next.5

4 years ago

4.0.1-next.4

4 years ago

4.0.1-next.2

4 years ago

4.0.1-next.1

4 years ago

4.0.1-next.0

4 years ago

4.0.0

4 years ago

3.8.1-next.16

4 years ago

3.8.1-next.17

4 years ago

3.9.0

4 years ago

4.0.0-beta.5

4 years ago

3.8.1-next.15

4 years ago

3.8.1-next.14

4 years ago

3.8.1-next.13

4 years ago

3.8.1-next.12

4 years ago

3.8.1-next.11

4 years ago

3.8.1-next.10

4 years ago

3.8.1-next.7

4 years ago

3.8.1-next.8

4 years ago

3.8.1-next.9

4 years ago

3.8.1-next.6

4 years ago

3.8.1-next.5

4 years ago

3.8.1-next.4

4 years ago

3.8.1-next.3

4 years ago

3.8.1-next.2

4 years ago

3.8.1-next.1

4 years ago

3.8.1-next.0

4 years ago

3.8.0

4 years ago

3.7.1-next.7

4 years ago

3.7.1-next.8

4 years ago

3.7.1-next.6

4 years ago

3.7.1-next.3

4 years ago

3.7.1-next.4

4 years ago

3.7.1-next.5

4 years ago

4.0.0-beta.4

4 years ago

3.7.1-next.2

4 years ago

3.7.1-next.0

4 years ago

4.0.0-beta.3

4 years ago

4.0.0-beta.2

4 years ago

3.6.1-next.14

4 years ago

3.7.0

4 years ago

3.6.1-next.13

4 years ago

3.6.1-next.12

4 years ago

3.6.1-next.11

4 years ago

3.6.1-next.10

4 years ago

3.6.1-next.9

4 years ago

3.6.1-next.8

4 years ago

3.6.1-next.7

4 years ago

3.6.1-next.6

4 years ago

3.6.1-next.5

4 years ago

3.6.1-next.4

4 years ago

3.6.1-next.3

4 years ago

3.6.1-next.2

4 years ago

3.6.1-next.1

4 years ago

3.6.1-next.0

4 years ago

4.0.0-beta.1

4 years ago

3.5.1-next.10

4 years ago

3.6.0

4 years ago

3.4.1

4 years ago

3.5.1-next.9

4 years ago

3.5.1-next.8

4 years ago

4.0.0-beta.0

4 years ago

3.5.1-next.7

4 years ago

3.5.1-next.6

4 years ago

3.5.1-next.5

4 years ago

3.5.1-next.4

4 years ago

3.5.1-next.3

4 years ago

3.5.1-next.2

4 years ago

3.5.1-next.1

4 years ago

3.5.1-next.0

4 years ago

3.5.0

4 years ago

3.4.1-next.17

4 years ago

3.4.1-next.16

4 years ago

3.4.1-next.15

4 years ago

3.4.1-next.14

4 years ago

3.4.1-next.13

4 years ago

3.4.1-next.12

4 years ago

3.4.1-next.11

4 years ago

3.4.1-next.10

4 years ago

3.4.1-next.8

4 years ago

3.4.1-next.9

4 years ago

3.4.1-next.6

4 years ago

3.4.1-next.7

4 years ago

3.4.1-next.5

4 years ago

3.4.1-next.4

4 years ago

3.4.1-next.3

4 years ago

3.4.1-next.2

4 years ago

3.4.1-next.0

4 years ago

3.4.1-next.1

4 years ago

3.3.3-next.31

4 years ago

3.4.0

4 years ago

3.3.3-next.30

4 years ago

3.3.3-next.29

4 years ago

3.3.3-next.28

4 years ago

3.3.3-next.27

4 years ago

3.3.3-next.26

4 years ago

3.3.3-next.21

4 years ago

3.3.3-next.25

4 years ago

3.3.3-next.19

4 years ago

3.3.3-next.18

4 years ago

3.3.3-next.17

4 years ago

3.3.3-next.15

4 years ago

3.3.3-next.14

4 years ago

3.3.3-next.16

4 years ago

3.3.0

4 years ago

3.2.0

4 years ago

3.1.0

4 years ago

3.0.1

5 years ago

3.0.0

5 years ago

3.0.0-beta.1

5 years ago

3.0.0-beta.0

5 years ago

3.0.0-alpha.7

5 years ago

3.0.0-alpha.6

5 years ago

3.0.0-alpha.5

5 years ago

3.0.0-alpha.4

5 years ago

3.0.0-alpha.3

5 years ago

3.0.0-alpha.2

5 years ago

3.0.0-alpha.1

5 years ago