Button Examples

<button class="e-btn">
  Button Label
</button>
<e-tooltip content="Settings">
  <button class="e-btn e-btn-onlyicon">
    <e-icon icon="cog"></e-icon>
  </button>
</e-tooltip>
<button class="e-btn e-btn-disabled" disabled>
  Disabled Button
</button>
<e-busy-indicator active="true" inline="true" size="small">
  <button class="e-btn" id="button-loading-has-icon">
    <e-icon icon="cog"></e-icon>
    Button With Icon
  </button>
</e-busy-indicator>

<e-busy-indicator active="true" inline="true" size="small">
  <button class="e-btn" id="button-loading-without-icon">
    Button Without Icon
  </button>
</e-busy-indicator>

<e-busy-indicator active="true" inline="true" size="small">
  <button class="e-btn e-btn-onlyicon" id="button-loading-only-icon">
    <e-icon icon="cog"></e-icon>
  </button>
</e-busy-indicator>
<button class="e-btn e-btn-small">
  Small Button Label
</button>

<button class="e-btn e-btn-large">
  Large Button Label
</button>

<button class="e-btn e-btn-large e-btn-extended">
  Extended Large Button Label
  <small>
    With Second Label
  </small>
</button>
<button class="e-btn e-btn-narrow">
  Narrow Button Label
</button>

<button class="e-btn e-btn-onlyicon e-btn-narrow">
  <e-icon icon="e-caret-right"></e-icon>
</button>
<button class="e-btn e-btn-fullwidth">
  Full-width Button Label
</button>
<button class="e-btn e-btn-primary">
  Primary Button Label
</button>
<button class="e-btn e-btn-borderless">
  Borderless Button Label
</button>
<button class="e-btn e-btn-active" id="toggleButton">Click to Toggle</button>

<div class="e-margin-l"></div>

<div id="checkboxlike">
  <button class="e-btn" type="submit">
    Button One
  </button>
  <button class="e-btn" type="submit">
    Button Two
  </button>
  <button class="e-btn" type="submit">
    Button Three
  </button>
</div>

<div class="e-margin-l"></div>

<div id="radiolike">
  <button class="e-btn e-btn-active" type="submit">
    Total #
  </button>
  <button class="e-btn" type="submit">
    Rate %
  </button>
</div>
document.querySelector('#toggleButton').addEventListener('click', (event) => {
  event.target.classList.toggle('e-btn-active');
});

checkboxlikeButtons = document.querySelectorAll("#checkboxlike .e-btn");

radiolikeButtons = document.querySelectorAll("#radiolike .e-btn");

checkboxlikeButtons.forEach( function( button ) {
  button.addEventListener('click', (event) => {
    event.target.classList.toggle('e-btn-active');
  });
});

radiolikeButtons.forEach( function( button ) {
  button.addEventListener('click', (event) => {
    radiolikeButtons.forEach( function( button ) {
      button.classList.remove('e-btn-active');
    });
    event.target.classList.toggle('e-btn-active');
  });
});
New AI Feature!

Try our new AI skill to implement designs easier and faster with guided generation and best-practice patterns. For more info, visit this page.