Material: Determining Side Label Shows up on md-checkbox?

Created on 26 Jan 2016  路  3Comments  路  Source: angular/material

Currently checkbox labels seem to only be positioned on the right side of a checkbox.
I usually like the prompt text to be on the left.

Is this possible to add? :)

Most helpful comment

:recycle: Another way is to add dir="rtl" attribute to parent element. This solution is better I think. You don't need to support this on feature updates.

<md-input-container dir="rtl">
   <md-checkbox>Import</md-checkbox>
</md-input-container>

More info here: https://material.angularjs.org/latest/CSS/checkbox

All 3 comments

Sure use custom CSS for .md-label.

Just use css class "order" with a value of to tell flex to specify the order.
Here you go!!!!

md-switch .md-container{
order : 2
}

:recycle: Another way is to add dir="rtl" attribute to parent element. This solution is better I think. You don't need to support this on feature updates.

<md-input-container dir="rtl">
   <md-checkbox>Import</md-checkbox>
</md-input-container>

More info here: https://material.angularjs.org/latest/CSS/checkbox

Was this page helpful?
0 / 5 - 0 ratings