Search results

Create ButtonGroup with icons

ButtonGroup with icons can be achieved by using iconCss property of the Button component.

The following example illustrates how to create ButtonGroup with icons.

import * as React from 'react';
import * as ReactDom from 'react-dom';
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';

// To render ButtonGroup with icons.
class App extends React.Component<{}, {}> {
  render() {
    return (
        <div className='e-btn-group'>
          <ButtonComponent iconCss='e-icons e-left-icon'>HTML</ButtonComponent>
          <ButtonComponent iconCss='e-icons e-middle-icon'>CSS</ButtonComponent>
          <ButtonComponent iconCss='e-icons e-right-icon'>Javascript</ButtonComponent>
ReactDom.render(<App />,document.getElementById('buttongroup'));
<!DOCTYPE html>
<html lang="en">

    <title>Syncfusion React Button</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description" content="Essential JS 2 for React Components" />
    <meta name="author" content="Syncfusion" />
    <link href="//" rel="stylesheet" />
    <link href="//" rel="stylesheet" />
    <link href="//" rel="stylesheet" />
    <link href="//" rel="stylesheet" />
	<link href="index.css" rel="stylesheet" />
    <script src=""></script>
    <script src="systemjs.config.js"></script>

        <div id='buttongroup'>
            <div id='loader'>Loading....</div>