ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

Make it possible to align checkbox to the right

Open fredgalvao opened this issue 12 years ago • 12 comments

I was able to achieve this with very little code change on codepen, and I think it's quite a nice addition to the checkbox feature having item-checkbox-right and item-checkbox-left just like pretty much everything list-wise.

http://codepen.io/fredgalvao/pen/ctKwp

I could make a PR on the weekend if it's deemed necessary, but I think this is a pretty small change and could come into tomorrow's beta? Looking forward to this.

fredgalvao avatar May 06 '14 18:05 fredgalvao

I like it! Sorry we didn't get to this issue in time for beta.4. But there's always next Wednesday's beta!

A PR would be welcomed.

ajoslin avatar May 09 '14 13:05 ajoslin

seems like ionic change checkbox style and right side checkbox buggy now

111crb111 avatar Apr 22 '15 08:04 111crb111

@111crb111 if you replace

<ion-item class="item-checkbox" ...

with

<ion-item class="item-checkbox-right" ...

it doesn't work. But if you use instead of it does work. see fredgalvao' codepen. Hope this helps

smorstabilini avatar May 26 '15 09:05 smorstabilini

Just what I needed! Thanks @fredgalvao :)

ryandraper avatar May 26 '15 23:05 ryandraper

This is supposed to work out-of-the-box on ionic now, since @adamdbradley / @ajoslin brought the codepen into native ionic css. If it's not working, it's a regression of some sort and it should be fixed or looked into, I guess.

Anyways, you're welcome, @ryandraper !

fredgalvao avatar May 27 '15 17:05 fredgalvao

should be documented http://ionicframework.com/docs/components/#checkbox

pablomaurer avatar Jul 17 '15 20:07 pablomaurer

docs?

lucassch avatar Oct 02 '15 17:10 lucassch

Doesn't seem to be working in Ionic 2.0.0-beta.24 with an ion-checkbox inside an ion-item using @fredgalvao codepen style. Is there a syntax to make this work out-of-the-box in Ionic2 like ion-checkbox-right ?

bitsagarob avatar Apr 14 '16 12:04 bitsagarob

I met the same problem, and found it works perfect by <ion-checkbox class="item-checkbox-right"> . Thanks a lot @fredgalvao @smorstabilini . Hope a doc on http://ionicframework.com/docs/components/#checkbox

meicj avatar Apr 20 '16 03:04 meicj

.item-checkbox-right {
  flex-direction: row-reverse;
}

<ion-item class="item-checkbox-right">

prosenjit-manna avatar Dec 09 '16 06:12 prosenjit-manna

I found this worked for me: https://ionicframework.com/docs/api/components/item/Item/

Use an "item-end"

Checkboxes, Radios and Toggles Checkboxes are positioned in the same place as the item-start attribute. Radios and Toggles are positioned in the same place as the item-end attribute. All of these components can be positioned differently by adding the item-start or item-end attribute.

rodneyjoyce avatar Jul 20 '17 23:07 rodneyjoyce

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

ionitron-bot[bot] avatar Sep 02 '18 10:09 ionitron-bot[bot]