GithubHelp home page GithubHelp logo

Comments (3)

stomita avatar stomita commented on May 19, 2024

I could create the desired UI by following markup, but it looks creepy...

  <div class="slds-button-group" role="group">
    <button class="slds-button slds-button--neutral">Save</button>
    <div class="slds-dropdown-trigger">
      <div class="slds-button-group">
        <button class="slds-button" style="display: none"></button>
        <button class="slds-button slds-button--icon-border-filled">
          <svg aria-hidden="true" class="slds-button__icon">
            <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#down"></use>
          </svg>
          <span class="slds-assistive-text">More Actions</span>
        </button>
      </div>
      <div class="slds-dropdown slds-dropdown--left slds-text-heading--label slds-dropdown--menu">
        <ul class="slds-dropdown__list" role="menu">
          <li href="#" class="slds-dropdown__item"><a href="#" class="slds-truncate" role="menuitem">Save as</a></li>
          <li href="#" class="slds-dropdown__item"><a href="#" class="slds-truncate" role="menuitem">Delete</a></li>
        </ul>
      </div>
    </div>
  </div>

dropdown menu in button group 2

from design-system.

stefsullrew avatar stefsullrew commented on May 19, 2024

Hi @stomita, you'll need to add the class .slds-button--last to your .slds-dropdown-trigger div element. It's mentioned in the component chart on the button-groups page: http://www.lightningdesignsystem.com/components/button-groups (And if you go to the page header component, you can see an example of it on the Record Home variant.)

Cheers!

from design-system.

stomita avatar stomita commented on May 19, 2024

Thanks @stefsullrew, it surely solves.

I'll write down the updated markup here for later reference.

  <div class="slds-button-group" role="group">
    <button class="slds-button slds-button--neutral">Save</button>
    <div class="slds-dropdown-trigger slds-button--last">
      <button class="slds-button slds-button--icon-border-filled">
        <svg aria-hidden="true" class="slds-button__icon">
          <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#down"></use>
        </svg>
        <span class="slds-assistive-text">More Actions</span>
      </button>
      <div class="slds-dropdown slds-dropdown--left slds-text-heading--label slds-dropdown--menu">
        <ul class="slds-dropdown__list" role="menu">
          <li href="#" class="slds-dropdown__item"><a href="#" class="slds-truncate" role="menuitem">Save as</a></li>
          <li href="#" class="slds-dropdown__item"><a href="#" class="slds-truncate" role="menuitem">Delete</a></li>
        </ul>
      </div>
    </div>
  </div>

from design-system.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.