Material-design-lite: Text field with icons

Created on 20 Jul 2015  路  7Comments  路  Source: google/material-design-lite

Most helpful comment

Hello,
Similar problem, I wanted to do this, what is right way to do this.
untitled-1

All 7 comments

I don鈥檛 think this calls for a separate component. Our current support for icons and textfields should already apply to this use-case or am I missing something?

You have a point, we don鈥檛 support propagating the active state to the icon.

For now you鈥檇 have to do something like

<i class="material-icons">phone</i>
<div class="mdl-textfield mdl-js-textfield textfield-demo">
  <input class="mdl-textfield__input" type="text" id="sample1" />
  <label class="mdl-textfield__label" for="sample1">Phone number</label>
</div>

Okay. Thanks a lot. :+1: :smile:

I've done something similar you may use : http://codepen.io/jfily/pen/epWyBa

Hello,
Similar problem, I wanted to do this, what is right way to do this.
untitled-1

We will have a solution for this in v2: see #4479

We are still in the very early stages of v2 and are currently working towards an alpha. Our master branch is where all v2 work is happening if you are interested in keeping up with its progress. 馃槃

Was this page helpful?
0 / 5 - 0 ratings