Can i use Tailwind CSS and Material UI in the same Next js project? - material-ui

If I used both of them, could I run into conflicts? Is this a good approach to use?

It is possible and the MUI team has been resolved it.
From the documentation:
If you are used to Tailwind CSS and want to use it together with the MUI components, you can start by cloning the Tailwind CSS example project. If you use a different framework or already have set up your project.
It is necessary to Remove Tailwind's base directive in favor of the CssBaseline component provided by #mui/material and fix the CSS injection order.
You can read how: https://mui.com/guides/interoperability/#tailwind-css

Yes you can run both ui framework. But it is not a good approach. Every ui framework has the complete solution for designing ui part. Like in tailwind css you can have the JIT compiler for compilation your custom css. Or the other hand MUI has also.
I think you can go through just only on ui framework. I have suggestion for ui. For your next js project you can use-
Tailwind Css
Theme-ui
Thank you.

Definitely, You will be in a big problem because once you initialize a styling library it applies its basic styles to the components so that if you are using more than one styling library you may not be able to change the behavior or styles of the components.
It also leads to rubbish suggestions while adding classes names and so on.
Stick to a UI libray and go with it.If you cant get it using the ui libraray do it yourself using CSS that could be more interesting and you can have more control over the components.

Use Mui base instead of Mui core.
https://mui.com/base/guides/working-with-tailwind-css/

I have tried using Mui and Tailwindcss together and it's not worth it. First, you will have to use Mui/base instead of Mui/material in order to reduce conflicts check https://mui.com/base/guides/working-with-tailwind-css. And if you really need to customize Mui components styled of the sx prop. This is just my opinion.

Related

Flutter svg animation and manipulation

I have an SVG asset of a map, in which I have to change the color of some cities depending on the results of a network call. On the web, one normally would add a class to each path, give it some CSS, and toggle that class using JavaScript.
How can I achieve the same effect in flutter?
This can be done with the new version of jovial_svg. It supports embedded stylesheets, so you can use CSS exactly as suggested. Of course, you'd need to re-parse the SVG whenever there's a change, but that's not a big deal here.
Alternately, if it's just one set of cities, you could use SVG's currentColor, and set that value in the appropriate ScalableImage factory. But for your use case, CSS seems like the better way to go.
NOTE: At this exact moment, CSS support is in pre-release, but it should be formally released as 1.1.4 within a couple of days. In the meantime, see https://pub.dev/packages/jovial_svg/versions/1.1.4-rc.3

How to make a Material UI layout

For vuetify, I use <v-content> for making may layout when I'm using Vue. Since I got used to this, I was finding this kind of component on Material UI.
Is there a way to convert this layout from Vuetify to Material UI?
<v-app>
<v-toolbar app>...</v-toolbar>
<v-navigation-drawer app>...</v-navigation-drawer permanent>
<v-content><nuxt/></v-content>
</app>
I was using nuxt on Vuetify. Now I'm using next for my react project.
I'm kind of finding the <v-app> and <v-content> like component for Material UI but I can't seem to find it. Or do I make that layout myself?
well, while Vue is more of a framework in the classic acceptance of the notion, react is more of a library, providing components that you can assemble in any way you may find appropriate
so you'll have to build that layout yourself
have a look at this example:
https://codesandbox.io/s/j1n94qvmvw

How to integrate react-dnd into admin-on-rest?

Has anyone tried to integrate react-dnd or another lib into admin on rest?
I wanted to make datagrid draggable inside a referencearrayfield.
Should i write my own component overriding datagrid or there's a simple way to do it?
Thanks!
You'll have to implement a custom datagrid for that
Although experimental you can have a look on this plugin: https://github.com/marmelab/react-admin/tree/master/packages/ra-tree-ui-materialui
It has as dependency react-dnd and it seems that it is editing the listing. Not sure if it can update a property used for ordering like order for example

How to do default styling in swift 3

What's the best way to perform simple default styling?
I'm not interested in styling every single UI element in the interface builder and the UIAppearance proxy seems to be very limited. I am looking for solutions to default styling UI elements with low coupling.
note that i am using swift 3 / xcode 8
UIAppearance is the default styling mechanism in UIKit. It doesn't seem very limited to me, yet it indeed has some downsides. You should give it a try if you haven't yet.
If you're interested in a non-UIAppearance-based approach, it's possible to craft even more powerful custom styling mechanism. For example, I've been able to attach and compose styles in the following manner:
final class CaptionLabel: UILabel, CaptionFontStyle, MultilineLabelStyle
See Style.swift and RootStyle.swift in the StyleSheet library for implementation details (it's really simple and there is an example project as well).

Unsure about the best way to fully separate my Dojo layers

Hey so I'm finding the documentation around building dojo a little hazy around layers.
For my Dojo 1.7+ application I would like a layer that contains only Dojo, and a layer that only contains my code, so I can place the appropriate copyright/license headers at the top.
Looking at build profile template, I see:
layers : {
"dojo/dojo":{
include:["dojo/dojo","dojo/i18n","dojo/ready","dojo/domReady"]
},
"myapp/core":{
include:["myapp/core/module1","myapp/core/module2","myapp/core/module3"],
exclude:["dojo/dojo"]
}
}
But when I look inside my 'myapp/core' layer js file I see lots of occurrences of
'define("dojo*'.
I started tackling this by finding each occurrence of the dojo define and putting that in the dojo/dojo layer include list, but that doesn't seem like the appropriate way of doing layers, is it? At the very least can't I just include certain packages? Am I making a big misunderstanding here?
Bonus it seems like the layer property 'copyrightFile' no longer works. Has that been deprecated, or changed?
Thanks
Are all these ("dojo/i18n","dojo/ready","dojo/domReady") dependencies the only dependencies that your external modules need? If myapp/core/module2 requires a dojo module that is not included in the dojo core layer, then it will be included in the myapp/core layer.
I have gone down the path you are going found it difficult to maintain the separation of code over time. I would create a single layer with both dojo and your code.
Use a layer to encapsulate code that is for specific area of functionality. For example, I have a graphical workflow editor that has it's own layer because it includes a bunch of svg code that doesn't need to be present in the rest of the application.