ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.94k stars 13.52k forks source link

Toggle with two labels #2509

Closed PureSpider closed 9 years ago

PureSpider commented 9 years ago

Refering to #433.

Instead of changing the values for "true" and "false" I'd like to have something like: Hot (o=) Cold So a toggle with labels on both sides. Is this currently possible?

Fayozjon commented 9 years ago

You can try to do it manually using just css for styling text-align

PureSpider commented 9 years ago

I could, sure, but I'd rather have this an ion if more users need it. I don't like custom hacks that break every other release :-1:

PureSpider commented 9 years ago

Essentially thinking about something like this: http://uidetails.com/center-stage/ or even better, this: http://uidetails.com/quick-setting-toggle/

drewrygh commented 9 years ago

The example in the first link looks like it can be done cleanly with CSS. Keep the "labels" and the slider as inline-block elements, with the toggle inline-block element between your two "label" divs. No hacks needed :)

The toggle on the second second link is actually pretty interesting. I think it could play well with ionic's toggle. Ideally, two things would happen if you used ionicons inside a toggle:

Ionitron commented 9 years ago

Greetings @PureSpider!

My sensors indicate that you have created an issue on our tracker that is more asking for usage help than an actual error with Ionic framework.

This Github issue tracker is used to track features, problems, and development of the framework.

If you wish to get help using the framework itself, the recommended place is the forum.

Thank you for allowing me to assist you.