material icon indicating copy to clipboard operation
material copied to clipboard

Floating label support for md-chips

Open mightyselva opened this issue 11 years ago • 39 comments

Hi, How to integrate floating label for md-chips. Styles are collapsing when doing so

mightyselva avatar Jun 10 '15 07:06 mightyselva

+1

tamsler avatar Jun 25 '15 19:06 tamsler

Agreed. Pretty much every component should support floating labels, as I've almost never seen a desktop web application that just has a single form field living on it's own.

dmackerman avatar Jun 25 '15 20:06 dmackerman

+1

ionTea avatar Jul 23 '15 16:07 ionTea

+1

alexcriss avatar Jul 28 '15 11:07 alexcriss

+1

fxck avatar Aug 11 '15 13:08 fxck

+1

evhen14 avatar Aug 31 '15 01:08 evhen14

+1

WalterWeidner avatar Sep 12 '15 03:09 WalterWeidner

+1. it should be same as the other input components

tirana avatar Oct 13 '15 16:10 tirana

+1

hsstan avatar Nov 03 '15 15:11 hsstan

+1

ptesser avatar Nov 10 '15 17:11 ptesser

+1

humana avatar Nov 18 '15 11:11 humana

+1

alphatwit avatar Nov 23 '15 16:11 alphatwit

If you include md-autocomplete in your chips, you can add the md-floating-label to that, but it requires a few CSS tweaks to get it to line up properly. Something like:

md-chips.with-floating-label{
    margin: 18px 0;
    display: block;
}
md-chips.with-floating-label md-chips-wrap{
    padding-left: 0px;
    padding-bottom: 0px;
}
md-chips.with-floating-label md-autocomplete[md-floating-label] md-input-container{
    margin-top: 0px;
}
md-chips.with-floating-label .md-chip-input-container:not(:first-child){
    margin-top: 28px;
}

alphatwit avatar Nov 23 '15 16:11 alphatwit

HI,

Can we update the milestone for this?

@alphatwit Can you please provide codepen for your workaround, I tried this but floating label were started after added chips.

mimani avatar Nov 30 '15 09:11 mimani

It's not the most attractive solution, and it does put the floating label after the chips unfortunately. http://codepen.io/anon/pen/VvoGBa

There's no obvious way to add a floating label to it without something looking weird. if it floats up above the chips, it might end up five miles up the screen, depending on how many chips you have. On the other hand if you leave it above the input box and you have a full row of chips, the input will be positioned a little too far from the rest of the chips in order to make room for the floating label.

alphatwit avatar Nov 30 '15 20:11 alphatwit

+1

ghost avatar Dec 05 '15 18:12 ghost

+1

StefanFeederle avatar Dec 08 '15 21:12 StefanFeederle

+1

chrislambe avatar Dec 16 '15 19:12 chrislambe

+1

ghost avatar Dec 23 '15 16:12 ghost

+1

Wingie avatar Jan 05 '16 08:01 Wingie