DevExtreme v24.2 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

React Button - Icons

To add an icon to a Button, set the icon property. This demo shows how you can use this property.

To give you the ability to edit code on the fly, the demo uses SystemJS. For this reason, launching the demo takes some time. We strongly recommend that you do not use this approach in real projects.
Backend API
  • Built-in icons
    DevExtreme ships with its own icon library. Pick any icon and assign its name to the icon property.

  • Image file
    Set the icon value to the image file path or URI.

  • 3rd-party icon fonts
    You can import a 3rd-party font library (this example uses Font Awesome). In such cases, set the icon property to a name that identifies the required glyph. Look up names in the imported library's documentation.

  • Buttons with icons and no caption text
    Define the icon, but do not define the text property. You can use the hint property to annotate the button.

Refer to the Icons help topic for additional information.