Giter VIP home page Giter VIP logo

Comments (4)

tjisousa avatar tjisousa commented on May 25, 2024

I'm interested in adding this feature, but I've a question: How should they look like? Same as in App Store?

from photon.

paranoid-android avatar paranoid-android commented on May 25, 2024

Cool.

I really like what's been built so far. I like the fact that Photon has an opinion and is trying to remain consistent with Mac OS X. With that in mind, I went through all of the baked-in apps and the system preferences. Unfortunately, I did not find a pure split button anywhere.

For that reason, I'm going to share an opinion on what I think it should look like while still trying to be consistent with the OS X theme.

In my opinion, I think a split button should look close to the image provided. I'm not a graphic designer. So, it's my best attempt. I say that because I think the padding is off in my picture. But the idea is here:

split-button

In my opinion, the split button should behave like the Bootstrap Split Button in the fact that a developer can:

  1. Decide whether the split part comes before or after the main button.
  2. Decide which icon they want to use. Sometimes you may want to use a "^", sometimes a "v", other times a "+", yet at other times a "-". I'm sure there are plenty of other cases. For that reason, just let someone pick the icon.

Thanks so much for taking this on. I wish I was more skilled with CSS to provide more impact.

from photon.

developit avatar developit commented on May 25, 2024

You could just use a button-group with two buttons. For the small button, you'd need to knock the horizontal padding down from the default of 8px:

<div class="btn-group">
    <button class="btn btn-default" style="padding:3px;">
        <span class="icon icon-left-open"></span>
    </button>
    <button class="btn btn-default">Today</button>
</div>

preview

preview 2

from photon.

paranoid-android avatar paranoid-android commented on May 25, 2024

Cool! Thanks for the feedback.

from photon.

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.