Outlined react phone number input - reactjs

I've just started learning react, so this question can be east, but thank you for help. Now I'm using Material UI in my project, and I need outlined phone number input with flag and label, which looks like enter image description here
But I can't find how to style any phone number picker to make it similar to this. Thnk you vey much for your help/

You probably want to grab InputBase from material-ui or just a regular html input tag and use className to style it. You could set the type="tel" or keep it as a string. You could add validation with yup to ensure that the right format is submitted.

Related

MUI DatePicker - How can I change YearPicker styling

I was just trying out DesktopDatePicker component and experimenting a bit with it's costumization and noticed I couldn't find any information on how to style YearPicker from DesktopDatePicker.
To costumize PickersDay, for instance, I can use renderDay prop and render a StyledPickersDay.
However for YearPicker, I don't see a renderYear or anything similar :/
enter image description here
For context, I wanted to change the color from blue to orange
Is there a different way to do this or it just hasn't been implemented yet?
You can edit the CSS in the YearPicker component: https://mui.com/x/api/date-pickers/year-picker/#css

How do you even use ant design's ConfigProvider in React?

I see in the antd docs, there is option to use ConfigProvider, where I can customize some styles or some behaviors.
In my case I want to customize outline style of elements(when I focus on input, it gives blue outline ring, so I just wanna make it green).
I wrapped my whole App inside ConfigProvider. But I can't find any example of code of actual customizing.
Any help will be appreciated :)

MaterialUI: Paper or Card title

Designing a React application, what I want is having the title of a Card or Paper on the top border with some indention from left side, like this:
I searched a lot and couldn't find a generic way to do so. Should I create a customised component or there's way for this?
I don't know exactly what you want it to look like, but you can achieve something like that by using the fieldset and legend elements.
It might look like this:
<fieldset>
<legend>Current</legend>
// Content within border.
</fieldset>
Result:
This approach is used by Material-UI for the "Outlined" variant of TextField (demo here). The code that handles this aspect is the NotchedOutline component (source here).
You can also fairly easily do something yourself via a position attribute to move a title element up over the border. This would actually allow you to use one of those material-ui components to provide most of the styles, and then just move the title on to the border.
Checkout this Codepen for an examples: https://codepen.io/codingmatty/pen/bOXKpZ

Display Text - Diplay Field

I want to display a static text in my app which would be a tab in my tabpanel...
I can only find textfield with input... how do I get a textfield no input to show?
In sencha architect
I think you're looking for label component: http://docs.sencha.com/extjs/4.0.7/#!/api/Ext.form.Label
Since you clarified that this is for Sencha Touch and not ExtJs, the only way to do is to use standard Ext.Component element and specify html property of it.

How to get numeric keypad on qooxdoo mobile textfield widget

I have a textfield widget in a qooxdoo mobile app which is intended for numeric input only.
Is there any way to get a numeric keypad when inputting/editing values on a qooxdoo mobile textfield widget?
I have found this http://blog.pamelafox.org/2012/05/triggering-numeric-keyboards-with-html5.html .
That link would be a solution if I knew how to access the html input element of the textfield widget that I could set the type and step attributes on it. But maybe qooxdoo offers a more direct solution.
So the question is - how to get a numeric keypad when inputting/editing to a qooxdoo mobile textfield widget.
There exists qooxdoo.ui.mobile.form.NumberField which has a very attractive numeric keypad.
Does the job very nicely.
Hope this helps someone else.

Resources