Search results

Spinner

Change spinner position

Spinner position can be changed by modifying the position property of spinSettingsModel. By default, the spinner is positioned at the left of the ProgressButton. You can position it at the left, right, top, bottom, or center of the text content.

Change spinner size

Spinner size can be changed by modifying the width property of spinSettingsModel. In this demo, the width is set to 20 to change the spinner size.

Spinner template

You can use custom spinner by specifying the template property of spinSettingsModel with custom styles.

The following sample demonstrates the above functionalities of the spinner.

Source
Preview
app.tsx
index.html
spinner.css
app.jsx
import { ProgressButtonComponent, SpinSettingsModel } from '@syncfusion/ej2-react-splitbuttons';
import * as React from 'react';
import * as ReactDom from 'react-dom';

class App extends React.Component<{}, {}> {

  private spinSettings : SpinSettingsModel = { position: 'Right', width: 20, template: '<div class="template"></div>' };

  public render() {
    return (
      <ProgressButtonComponent content='Submit' spinSettings={this.spinSettings}/>
    );
  }
}
ReactDom.render(<App />, document.getElementById('progress-button'));
<!DOCTYPE html>
<html lang="en">

<head>
    <title>Syncfusion React Progress Button</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description" content="This demo for React Progress button has progress indicator and spinner. It supports texts, icons, styles, sizes, positions, and its customization." />
    <meta name="author" content="Syncfusion" />
    <link href="//cdn.syncfusion.com/ej2/ej2-base/styles/material.css" rel="stylesheet" />
    <link href="//cdn.syncfusion.com/ej2/ej2-buttons/styles/material.css" rel="stylesheet" />
    <link href="//cdn.syncfusion.com/ej2/ej2-popups/styles/material.css" rel="stylesheet" />
    <link href="//cdn.syncfusion.com/ej2/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
    <link href="index.css" rel="stylesheet" />
    <link href="spinner.css" rel="stylesheet" />
    <link href="progress.css" rel="stylesheet" />
    <link href="icon.css" rel="stylesheet" />
    <link href="events.css" rel="stylesheet" />
    <script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
    <script src="systemjs.config.js"></script>
</head>

<body>
        <div id='progress-button'>
            <div id='loader'>Loading....</div>
        </div>
</body>

</html>
@keyframes custom-rolling {
0% {
      -webkit-transform: rotate(0deg);
      transform: rotate(0deg);
  }
100% {
      -webkit-transform: rotate(360deg);
      transform: rotate(360deg);
  }
}

.template {
  border: 2px solid green;
  border-style: dotted;
  border-radius: 50%;
  border-top-color: transparent;
  border-bottom-color: transparent;
  height: 16px;
  width: 16px;
}

.template {
  -webkit-animation: custom-rolling 1.3s linear infinite;
  animation: custom-rolling 1.3s linear infinite;
}
import { ProgressButtonComponent } from '@syncfusion/ej2-react-splitbuttons';
import * as React from 'react';
import * as ReactDom from 'react-dom';
class App extends React.Component {
    constructor() {
        super(...arguments);
        this.spinSettings = { position: 'Right', width: 20, template: '<div class="template"></div>' };
    }
    render() {
        return (<ProgressButtonComponent content='Submit' spinSettings={this.spinSettings}/>);
    }
}
ReactDom.render(<App />, document.getElementById('progress-button'));

Progress

Content animation

The content of the ProgressButton can be animated during progress using the effect property of animationSettingsModel. You can also set custom duration and timing function using the duration and easing properties. The possible effect values are None, SlideLeft, SlideRight, SlideUp, SlideDown, ZoomIn, and ZoomOut.

Source
Preview
app.tsx
index.html
app.jsx
import { AnimationSettingsModel, ProgressButtonComponent, SpinSettingsModel } from '@syncfusion/ej2-react-splitbuttons';
import * as React from 'react';
import * as ReactDom from 'react-dom';

class App extends React.Component<{}, {}> {

  private animationSettings: AnimationSettingsModel = { effect: 'SlideLeft',  duration: 500, easing: 'linear' };
  private spinSettings : SpinSettingsModel = { position: 'Center' };

  public render() {
    return (
      <ProgressButtonComponent content='Slide Left' enableProgress = {true} animationSettings={this.animationSettings} spinSettings={this.spinSettings}/>
    );
  }
}
ReactDom.render(<App />, document.getElementById('progress-button'));
<!DOCTYPE html>
<html lang="en">

<head>
    <title>Syncfusion React Progress Button</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description" content="This demo for React Progress button has progress indicator and spinner. It supports texts, icons, styles, sizes, positions, and its customization." />
    <meta name="author" content="Syncfusion" />
    <link href="//cdn.syncfusion.com/ej2/ej2-base/styles/material.css" rel="stylesheet" />
    <link href="//cdn.syncfusion.com/ej2/ej2-buttons/styles/material.css" rel="stylesheet" />
    <link href="//cdn.syncfusion.com/ej2/ej2-popups/styles/material.css" rel="stylesheet" />
    <link href="//cdn.syncfusion.com/ej2/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
    <link href="index.css" rel="stylesheet" />
    <link href="spinner.css" rel="stylesheet" />
    <link href="progress.css" rel="stylesheet" />
    <link href="icon.css" rel="stylesheet" />
    <link href="events.css" rel="stylesheet" />
    <script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
    <script src="systemjs.config.js"></script>
</head>

<body>
        <div id='progress-button'>
            <div id='loader'>Loading....</div>
        </div>
</body>

</html>
import { ProgressButtonComponent } from '@syncfusion/ej2-react-splitbuttons';
import * as React from 'react';
import * as ReactDom from 'react-dom';
class App extends React.Component {
    constructor() {
        super(...arguments);
        this.animationSettings = { effect: 'SlideLeft', duration: 500, easing: 'linear' };
        this.spinSettings = { position: 'Center' };
    }
    render() {
        return (<ProgressButtonComponent content='Slide Left' enableProgress={true} animationSettings={this.animationSettings} spinSettings={this.spinSettings}/>);
    }
}
ReactDom.render(<App />, document.getElementById('progress-button'));

Change step of the ProgressButton

The progress can be visualized at the specified interval by changing the step property in the begin event of the ProgressButton. In this demo, the step property is set to 20 to show progress at every 20% increment.

Source
Preview
app.tsx
index.html
app.jsx
import { ProgressButtonComponent, ProgressEventArgs } from '@syncfusion/ej2-react-splitbuttons';
import * as React from 'react';
import * as ReactDom from 'react-dom';

class App extends React.Component<{}, {}> {

  public begin(args: ProgressEventArgs): void {
      args.step = 20;
  }

  public render() {
    return (
      <ProgressButtonComponent content='Progress Step' enableProgress = {true} begin={this.begin} cssClass='e-hide-spinner'/>
    );
  }
}
ReactDom.render(<App />, document.getElementById('progress-button'));
<!DOCTYPE html>
<html lang="en">

<head>
    <title>Syncfusion React Progress Button</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description" content="This demo for React Progress button has progress indicator and spinner. It supports texts, icons, styles, sizes, positions, and its customization." />
    <meta name="author" content="Syncfusion" />
    <link href="//cdn.syncfusion.com/ej2/ej2-base/styles/material.css" rel="stylesheet" />
    <link href="//cdn.syncfusion.com/ej2/ej2-buttons/styles/material.css" rel="stylesheet" />
    <link href="//cdn.syncfusion.com/ej2/ej2-popups/styles/material.css" rel="stylesheet" />
    <link href="//cdn.syncfusion.com/ej2/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
    <link href="index.css" rel="stylesheet" />
    <link href="spinner.css" rel="stylesheet" />
    <link href="progress.css" rel="stylesheet" />
    <link href="icon.css" rel="stylesheet" />
    <link href="events.css" rel="stylesheet" />
    <script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
    <script src="systemjs.config.js"></script>
</head>

<body>
        <div id='progress-button'>
            <div id='loader'>Loading....</div>
        </div>
</body>

</html>
import { ProgressButtonComponent } from '@syncfusion/ej2-react-splitbuttons';
import * as React from 'react';
import * as ReactDom from 'react-dom';
class App extends React.Component {
    begin(args) {
        args.step = 20;
    }
    render() {
        return (<ProgressButtonComponent content='Progress Step' enableProgress={true} begin={this.begin} cssClass='e-hide-spinner'/>);
    }
}
ReactDom.render(<App />, document.getElementById('progress-button'));

The class e-hide-spinner hides the spinner in the ProgressButton, For more information, see hide spinner section.

Change progress dynamically

The progress can be changed dynamically by modifying the percent property in the ProgressButton events. In this demo, on 40% completion of progress, the percent property is set to 90 to show dynamic change of the progress.

Source
Preview
app.tsx
index.html
app.jsx
import { ProgressButtonComponent, ProgressEventArgs } from '@syncfusion/ej2-react-splitbuttons';
import * as React from 'react';
import * as ReactDom from 'react-dom';

class App extends React.Component<{}, {content: string}> {
  constructor(props: any) {
    super(props);
    this.state = { content: 'Progress' };
    this.begin = this.begin.bind(this);
    this.progress = this.progress.bind(this);
    this.end = this.end.bind(this);
  }

  public render() {
    return (
      <ProgressButtonComponent content={this.state.content} enableProgress = {true} duration={15000} begin={this.begin} progress={this.progress} end={this.end} cssClass='e-hide-spinner'/>
    );
  }

  private begin(args: ProgressEventArgs): void {
    this.setState({ content: 'Progress ' + args.percent + '%' });
  }

  private progress(args: ProgressEventArgs): void {
    this.setState({ content: 'Progress ' + args.percent + '%' });
    if (args.percent === 40) {
      args.percent = 90;
    }
  }

  private end(args: ProgressEventArgs): void {
    this.setState({ content: 'Progress ' + args.percent + '%' });
  }
}
ReactDom.render(<App />, document.getElementById('progress-button'));
<!DOCTYPE html>
<html lang="en">

<head>
    <title>Syncfusion React Progress Button</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description" content="This demo for React Progress button has progress indicator and spinner. It supports texts, icons, styles, sizes, positions, and its customization." />
    <meta name="author" content="Syncfusion" />
    <link href="//cdn.syncfusion.com/ej2/ej2-base/styles/material.css" rel="stylesheet" />
    <link href="//cdn.syncfusion.com/ej2/ej2-buttons/styles/material.css" rel="stylesheet" />
    <link href="//cdn.syncfusion.com/ej2/ej2-popups/styles/material.css" rel="stylesheet" />
    <link href="//cdn.syncfusion.com/ej2/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
    <link href="index.css" rel="stylesheet" />
    <link href="spinner.css" rel="stylesheet" />
    <link href="progress.css" rel="stylesheet" />
    <link href="icon.css" rel="stylesheet" />
    <link href="events.css" rel="stylesheet" />
    <script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
    <script src="systemjs.config.js"></script>
</head>

<body>
        <div id='progress-button'>
            <div id='loader'>Loading....</div>
        </div>
</body>

</html>
import { ProgressButtonComponent } from '@syncfusion/ej2-react-splitbuttons';
import * as React from 'react';
import * as ReactDom from 'react-dom';
class App extends React.Component {
    constructor(props) {
        super(props);
        this.state = { content: 'Progress' };
        this.begin = this.begin.bind(this);
        this.progress = this.progress.bind(this);
        this.end = this.end.bind(this);
    }
    render() {
        return (<ProgressButtonComponent content={this.state.content} enableProgress={true} duration={15000} begin={this.begin} progress={this.progress} end={this.end} cssClass='e-hide-spinner'/>);
    }
    begin(args) {
        this.setState({ content: 'Progress ' + args.percent + '%' });
    }
    progress(args) {
        this.setState({ content: 'Progress ' + args.percent + '%' });
        if (args.percent === 40) {
            args.percent = 90;
        }
    }
    end(args) {
        this.setState({ content: 'Progress ' + args.percent + '%' });
    }
}
ReactDom.render(<App />, document.getElementById('progress-button'));

The method dataBind applies the property changes immediately to the component.

Start and stop methods

You can pause and resume the progress using the stop and start methods, respectively. In this demo, clicking the ProgressButton will pause and resume the progress.

Source
Preview
app.tsx
index.html
icon.css
app.jsx
import { ProgressButtonComponent } from '@syncfusion/ej2-react-splitbuttons';
import * as React from 'react';
import * as ReactDom from 'react-dom';

class App extends React.Component<{}, {content: string, iconCss: string}> {
  private progressBtn: ProgressButtonComponent;
  constructor(props: any) {
    super(props);
    this.state = { content: 'Download', iconCss: 'e-btn-sb-icon e-download' };
    this.end = this.end.bind(this);
    this.clickHandler = this.clickHandler.bind(this);
  }

  public render() {
    return (
      <ProgressButtonComponent content={this.state.content} enableProgress = {true} duration={4000}
      iconCss={this.state.iconCss} end={this.end} cssClass='e-hide-spinner' onClick={this.clickHandler.bind(this)} ref={(scope)=>{this.progressBtn = scope as ProgressButtonComponent;}}/>
    );
  }

  private end(): void {
    this.setState({ content: 'Download', iconCss: 'e-btn-sb-icon e-download' });
  }
  
  private clickHandler(): void {
    if (this.state.content === 'Download') {
      this.setState({ content: 'Pause', iconCss: 'e-btn-sb-icon e-pause' });
    }
    else if (this.state.content === 'Pause') {
      this.setState({ content: 'Resume', iconCss: 'e-btn-sb-icon e-play' });
      this.progressBtn.stop();
    }
    else if (this.state.content === 'Resume') {
      this.setState({ content: 'Pause', iconCss: 'e-btn-sb-icon e-pause' });
      this.progressBtn.start();
    }
  }
}

ReactDom.render(<App />, document.getElementById('progress-button'));
<!DOCTYPE html>
<html lang="en">

<head>
    <title>Syncfusion React Progress Button</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description" content="This demo for React Progress button has progress indicator and spinner. It supports texts, icons, styles, sizes, positions, and its customization." />
    <meta name="author" content="Syncfusion" />
    <link href="//cdn.syncfusion.com/ej2/ej2-base/styles/material.css" rel="stylesheet" />
    <link href="//cdn.syncfusion.com/ej2/ej2-buttons/styles/material.css" rel="stylesheet" />
    <link href="//cdn.syncfusion.com/ej2/ej2-popups/styles/material.css" rel="stylesheet" />
    <link href="//cdn.syncfusion.com/ej2/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
    <link href="index.css" rel="stylesheet" />
    <link href="spinner.css" rel="stylesheet" />
    <link href="progress.css" rel="stylesheet" />
    <link href="icon.css" rel="stylesheet" />
    <link href="events.css" rel="stylesheet" />
    <script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
    <script src="systemjs.config.js"></script>
</head>

<body>
        <div id='progress-button'>
            <div id='loader'>Loading....</div>
        </div>
</body>

</html>
@font-face {
	font-family: 'btn-icon';
	src:
	url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAAKAIAAAwAgT1MvMj1tSfgAAAEoAAAAVmNtYXDnH+dzAAABoAAAAEJnbHlm1v48pAAAAfgAAAQYaGVhZBOPfZcAAADQAAAANmhoZWEIUQQJAAAArAAAACRobXR4IAAAAAAAAYAAAAAgbG9jYQN6ApQAAAHkAAAAEm1heHABFQCqAAABCAAAACBuYW1l07lFxAAABhAAAAIxcG9zdK9uovoAAAhEAAAAgAABAAAEAAAAAFwEAAAAAAAD9AABAAAAAAAAAAAAAAAAAAAACAABAAAAAQAAJ1LUzF8PPPUACwQAAAAAANg+nFMAAAAA2D6cUwAAAAAD9AP0AAAACAACAAAAAAAAAAEAAAAIAJ4AAwAAAAAAAgAAAAoACgAAAP8AAAAAAAAAAQQAAZAABQAAAokCzAAAAI8CiQLMAAAB6wAyAQgAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAA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BpAGMAbwBuAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAHUAcwBpAG4AZwAgAFMAeQBuAGMAZgB1AHMAaQBvAG4AIABNAGUAdAByAG8AIABTAHQAdQBkAGkAbwB3AHcAdwAuAHMAeQBuAGMAZgB1AHMAaQBvAG4ALgBjAG8AbQAAAAACAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgBAgEDAQQBBQEGAQcBCAEJAAptZWRpYS1wbGF5C21lZGlhLXBhdXNlDmFycm93aGVhZC1sZWZ0BHN0b3AJbGlrZS0tLTAxBGNvcHkQLWRvd25sb2FkLTAyLXdmLQAA) format('truetype');
	font-weight: normal;
	font-style: normal;
}

.e-btn-sb-icon {
	font-family: 'btn-icon' !important;
	speak: none;
	font-size: 55px;
	font-style: normal;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.e-download::before {
  content: '\e706';
}

.e-play::before {
  content: '\e700';
}

.e-pause::before {
  content: '\e701';
}
import { ProgressButtonComponent } from '@syncfusion/ej2-react-splitbuttons';
import * as React from 'react';
import * as ReactDom from 'react-dom';
class App extends React.Component {
    constructor(props) {
        super(props);
        this.state = { content: 'Download', iconCss: 'e-btn-sb-icon e-download' };
        this.end = this.end.bind(this);
        this.clickHandler = this.clickHandler.bind(this);
    }
    render() {
        return (<ProgressButtonComponent content={this.state.content} enableProgress={true} duration={4000} iconCss={this.state.iconCss} end={this.end} cssClass='e-hide-spinner' onClick={this.clickHandler.bind(this)} ref={(scope) => { this.progressBtn = scope; }}/>);
    }
    end() {
        this.setState({ content: 'Download', iconCss: 'e-btn-sb-icon e-download' });
    }
    clickHandler() {
        if (this.state.content === 'Download') {
            this.setState({ content: 'Pause', iconCss: 'e-btn-sb-icon e-pause' });
        }
        else if (this.state.content === 'Pause') {
            this.setState({ content: 'Resume', iconCss: 'e-btn-sb-icon e-play' });
            this.progressBtn.stop();
        }
        else if (this.state.content === 'Resume') {
            this.setState({ content: 'Pause', iconCss: 'e-btn-sb-icon e-pause' });
            this.progressBtn.start();
        }
    }
}
ReactDom.render(<App />, document.getElementById('progress-button'));

See Also