All guides and resources

Export and use icons in React

Take a free icon from the inspector into a React component with size, color, and accessible button labels.

Browse the icon libraryTry the UI examples

Export the component

Open the free Playday Dragon in the library. Choose an appearance, switch the code tab to React, and download the JSX. Save it as DragonIcon.jsx alongside the component that uses it.

import DragonIcon from "./DragonIcon.jsx"

export function QuestButton({ onOpen }) {
  return (
    <button type="button" onClick={onOpen}>
      <DragonIcon size={32} aria-hidden="true" />
      Open quest
    </button>
  )
}

The button’s label supplies the accessible name. For a monochrome export, use color="currentColor" to inherit the button’s text color, or pass a CSS color directly.

Reuse the same proportions

Use the size prop to adjust layout without stretching the paths. Start with a small group of primitives for toolbar actions, then add larger icons when the illustration helps explain a state or object.