Orientation of tabs component does not work in RadixUI - reactjs

I am using RadixUI and there is orientation props, which could be vertically set. I tried to use this prop and expect that thabs will be aligned in column but it does not work:
<Tabs.Root orientation="vertical" className="TabsRoot" defaultValue="tab1">
Question: Did someone faced this issue and how to solve it?

According to Radix UI, they are a style-free library, which means that the orientation prop does not change the UI. You would need to apply the styles. vertical means that the up / down arrow will move focus within the component
You can read more about the functionality here https://github.com/radix-ui/website/issues/463

Related

How to use Material UI Grid spacing prop properly in nested grids?

I am trying to create a Basic Layout with React using Material UI Grid component.
I am following official documentation but the spacing prop seems very confusing and there is very less information available or its unclear in documentation.
When i am trying to nest Grid to create the layout, the negative margins added by the spacing prop confusingly pulling the items and breaking the UI.
Below is the very simple Layout in trying to do
I finally managed to do it with some very complex nestings and custom styles using sx prop as shown below in the codesandbox.
https://codesandbox.io/s/materialgriddilemma-vheq19?file=/src/Layout.js
But I am wondering, for a simple use case as this do I really need to write custom styles?!!
What is the cleanest and recommended way to use Nested Grids in Material UI with Spacing ?

Popper isn't getting a z-index?

I'm using the following component:
https://material-ui.com/components/popper/
In the DOM, it has the role of tooltip. I expect that it would automatically get the tooltip zIndex from the theme here:
https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/styles/zIndex.js
But it gets no z-index. What gives?
Seems like you're using a component that is too low-level. The zIndex.tooltip you've mentioned is being used in the Tooltip component. So you have two options:
Switch your code to be using Tooltip directly and don't worry about applying zIndexes around
Keep your Popper implementation apply the zIndex manually. Or use withStyles, just like the Tooltip component does.
For a greater flexibility and control over how stuff gets done, I would prefer the second approach, to be fair.

Find out if react-bootstrap Navbar is collapsed

First, the nomenclature here is somewhat vague. I will be explicitly using "collapse" to refer to react-bootstrap's behavior of collapsing the Navbar on smaller viewport widths, and "expand" in reference to toggling a collapsed menu into and out of view.
My goal is to create a navigation bar that, while collapsed (mobile), uses the whole Navbar as a toggle to expand the menu. On wider displays (not collapsed) clicking the Navbar should have no action. For this, I need to know if the Navbar has collapsed. (Note that Navbar's expanded prop doesn't cut it here.)
The obvious solution is to modify behavior based on viewport width. However, I'd like not to copy bootstrap's breakpoint widths, but rather refer to the actual state of the Navbar. That would allow for using Navbar's expand prop to change breakpoint setting, etc. Is it possible to access this information in a reasonable manner?
Thanks, all!

Material-UI how to set a zIndex for a div?

I'm new to Material-UI. I understand that there are 6 possible zIndices. The documentation states that
zIndex can be used to change the level of each component.
How do I change the zIndex of a custom div that I created?
After a bit of research, I realized that you need to use a Paper element instead of a div. You can find the documentation for the component here:
http://www.material-ui.com/#/components/paper
You seem zoned out a little. zDepth and zIndex are completely different. zIndex is used for aligning the views on top of each other, as in which view should be on top of the other.
zDepth on the other hand in the material ui paper component is only used to assign the depth of 'shadow' of the paper.
Hope that resolves it.

Codename One - Layout issue

I've a GUI built app and I set many Icon images in the code for some components.
The thing is I've made sure all "padding" and "margin" values are the same for the different states of the components (unselected, pressed, etc) but when I try to input data into the TextFields, it seems like the dimensions of some components change without notice and they completely mess with my layout.
Even sometimes some of the icons partially disappear. Please see the following screenshot of before and after text input, where the Container and TextFields shrink
I really don't know what else I can do. I have tried many things, but stil the same outcome. Please help.
You need to make the container housing all this components scrollable.
Use Millimeters for your TextField padding and margin, don't use Screen Percentage. From the image in the images you posted, 2mm top and bottom and 1mm left and right would be suitable.
If the components having those icons are pressable like a button, be sure to set their pressedIcon to the same icon.
Lastly, style your TextField Unselected state and copy this to Selected and Pressed states, to avoid erroneous styling.

Resources