ui-material-components icon indicating copy to clipboard operation
ui-material-components copied to clipboard

Customize the styling of the border

Open bliulin opened this issue 5 years ago • 15 comments

Hi,

Is there some reason why the border width cannot be set by CSS? I've tried this in both android and ios with no effect. Changing the border color only appears to work on ios.

This is my text field:

<MDTextField
    style="border-style: solid; border-width: 10; border-color: blueviolet;"
    placeholderColor="#969FB5"
    keyboardType="phone"
    hint="Email"
  ></MDTextField> 

Thanks

bliulin avatar Nov 22 '19 12:11 bliulin

@bliulin actually the handling of the border with the textfield is not fully handled yet. The reason is that i wanted border style to apply to the material "border" of the textfield. I mean the line in underline and the full border in outline.

Need to think about this.

farfromrefug avatar Nov 22 '19 12:11 farfromrefug

Is there a way to change the border color of MDTextField when active? Screen Shot 2019-11-25 at 8 45 26 AM

aashaya avatar Nov 25 '19 16:11 aashaya

You can theme your app colors with the themer. Look at the nativescript-material-core typings (I am on my phone right now can tcopy the link)

farfromrefug avatar Nov 25 '19 21:11 farfromrefug

@farfromrefug Thank you very much! Screen Shot 2019-11-26 at 9 45 11 PM themer.setPrimaryColor();

aashaya avatar Nov 27 '19 05:11 aashaya

@farfromrefug Thank you very much! Screen Shot 2019-11-26 at 9 45 11 PM themer.setPrimaryColor();

Hello, Is there a solution to make the filled MDTextField to have border like the outlined one? I need the floating from the filled version into the outline version.

mrcretu avatar Nov 27 '19 09:11 mrcretu

@mrcretu that should be possible. Can you post a screenshot of the filled version with the border you are talking about?

farfromrefug avatar Nov 27 '19 13:11 farfromrefug

image

I need something like this. The border from the outline version with floating label from filled one. It is possible to customize the filled one to have border?

mrcretu avatar Nov 27 '19 14:11 mrcretu

@mrcretu ok i see. So this is not filled. https://material.io/components/text-fields/ You have to use variant "none" and handle this yourself with border color and focused state. Material style does not come with the one you want

farfromrefug avatar Nov 27 '19 15:11 farfromrefug

@farfromrefug First, thank you for fast responses. I've tried with variant "none" but I'm not able to apply any style on MDTextField like border-color or something else. Any help regarding this issue, please? Maybe an example or smt. Thank you in advance.

mrcretu avatar Nov 27 '19 18:11 mrcretu

Hi is there any solution for adding trailing icons?

NavruzbekNoraliev avatar Feb 09 '21 11:02 NavruzbekNoraliev

Also, I have an issue, in outlined MdTextfield in Android I get cursor color in gray, which I don't see in white background, is there any solution to change cursor color?

NavruzbekNoraliev avatar Feb 09 '21 11:02 NavruzbekNoraliev

@NavruzbekNoraliev please stay on point this is not a place for discussion. I think i already asked you ;)

farfromrefug avatar Feb 09 '21 13:02 farfromrefug

@mrcretu sorry for answering so late. I have been doing it for a while. Are you still faciing the issue?

farfromrefug avatar Feb 09 '21 13:02 farfromrefug

@NavruzbekNoraliev please stay on point this is not a place for discussion. I think i already asked you ;)

wasn't it related to the theme of the issue?

NavruzbekNoraliev avatar Feb 09 '21 14:02 NavruzbekNoraliev

@NavruzbekNoraliev trailing icon and cursor color when this issue is about border color ? Dont think so. Please move your questions to Slack. If you want to add features. You can add a proper feature request issue and then you can look at creating a PR ;)

farfromrefug avatar Feb 09 '21 14:02 farfromrefug