Skip to content

Icon Toggle [new component request] #2375

Closed

Description

@hacknaked

Would be great to include icon toggles as defined in https://material.io/guidelines/components/buttons.html#buttons-toggle-buttons

MDC has a nice implementation of this
https://material-components-web.appspot.com/icon-toggle.html

Activity

  1. hacknaked commented on Dec 23, 2016

    @hacknaked
    Author

    @fxck Yes, maybe an icon toggle can be implemented using exclusive selection button groups, but it seems wired to me (a group with only one element and two level html markup.

    I'd prefer something like <md-icon-toggle>my-icon</md-icon-toggle>.

  2. jmcgoldrick commented on Dec 24, 2016

    @jmcgoldrick

    How would md-icon-toggle work with different icon fonts etc? I've been doing something like this: http://plnkr.co/edit/zMJc32INjgQru1otxnUo?p=preview which is even nicer using the new NgIfElse

    edit: updated plunk

  3. EladBezalel commented on Jan 12, 2017

    @EladBezalel
    Member

    MDC implementation is not following the material design spec (no outlines) -
    We do have icon buttons

  4. hacknaked commented on Jan 12, 2017

    @hacknaked
    Author

    @EladBezalel

    MDC implementation is not following the material design spec

    Well, It's really wired.

    https://material.io/components/ links to https://github.com/material-components/material-components-web#useful-links. If you follow the Demos link you will reach the Icon Toggle demo I've post.

    Seems that MDC Icon Toggle was made by the same guys that write Material Design Spec.

  5. EladBezalel commented on Jan 12, 2017

    @EladBezalel
    Member

    Well, https://material.io/components/ is the website for https://github.com/material-components/material-components-web#useful-links.

    They're not the same guys and even if they're, if its not in the spec, we won't implement it.

  6. hacknaked commented on Jan 12, 2017

    @hacknaked
    Author

    @EladBezalel

    But, what's the official Material spec?
    In your first comment you linked to https://material.io/guidelines

    Are you saying that people who write https://material.io/guidelines are not the same that people who implement https://material.io/components? Why both projects share material.io domain if they don't follow the same spect? Sorry, for dumb questions, but it's confusing.

  7. EladBezalel commented on Jan 12, 2017

    @EladBezalel
    Member

    Yes, just as the people that write material.angular.io are not the same as augury.angular.io

  8. cesartolosa commented on Feb 18, 2017

    @cesartolosa

    I am confused @EladBezalel

    MDC implementation is not following the material design spec

    I visited the link you shared and Icon toggles is included in the material design spec as part of the Toggle buttons section, so I think that something like <md-icon md-icon-toggles>my_icon</md-icon> would be perfect.

  9. EladBezalel commented on Feb 19, 2017

    @EladBezalel
    Member

    I'm talking about outlining the icon itself, this part is not included in the material design spec.

    You can totally have icon buttons as simple as:

    <button mdIconButton>
      <md-icon>my_icon</md-icon>
    </button>
  10. cesartolosa commented on Feb 20, 2017

    @cesartolosa

    Ok @EladBezalel, but what about the ripple ink response? The ripple ink boundary seems to be different (out of boundaries) to icon toggles than the regular icon button.

  11. EladBezalel commented on Feb 20, 2017

    @EladBezalel
    Member
  12. cesartolosa commented on Feb 20, 2017

    @cesartolosa

    @EladBezalel, thanks!!!

  13. thw0rted commented on Jan 19, 2018

    @thw0rted

    I know this is super old, but @EladBezalel or others, as far as I can tell there's still no official implementation of "Icon Toggle" from the spec. Yes, you can hack in behavior for a toggle based on mat-icon-button but I'd like to see something as easy to use as mat-checkbox, where toggle state is maintained by the component.

    Since icon toggles are in the spec, I would suggest that they should have an example in the docs (and, ideally, easy to use syntax).

  14. angular-automatic-lock-bot commented on Sep 8, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  15. locked and limited conversation to collaborators on Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions