Tailwindcss in Figma - tailwind-css

I wonder if it is possible to use Tailwindcss with Figma? And if someone does, is there any example to see? I saw that it is possible to export colors from Figma and import them in taiwind config. But what about Tailwindcss utilities? Also that it should work for Tailwind v1. Best regards

As far as I know there is not really an option for Figma to import such things until the new plugins feature goes out of closed beta. However I've been working on bringing tailwind styles and components here, hope this helps.
cheers!

Figma decided to shut down the tailwindcss integration, apparently to focus on more and better design functionality. I just read that recently (November 2021).

Related

How to use Antdesign with tailwindcss together in a React Project

I'm going to set up a new project and would like to have these two packages together, but not sure, so the question is that using Tailwindcss with antdesign Is a good practice?
Does anyone have any experiences?
Each package has its own theme manager for instance for colors, typography, dark mode and so on. How do you manage theme, with tailwinds or antd or both? And why?
Both packages have Grid support, which one would you prefer?
Let's have your insights?
After some research, I found these results
Some examples that uses both libs:
https://github.com/plamworapot/next-antd-tailwindcss
https://github.com/dospolov/react-redux-saga-antd-tailwind-boilerplate
https://github.com/cunhamuril/pocs
It recommended trying to commit to only one framework
Tailwind is pretty much a design system using utility classes to make writing css easier therefore it can be pretty much used with any other ui library just make sure to disable the default styling that Tailwind inject into your default styling by disabling the preflight option in config :
module.exports = {
corePlugins: {
preflight: false,
}
}
One slight issue with using both ant-design and tailwind-css is tailwind's some of default styles will break ant-design components...
I recently came a cross an issue where ant-design image preview was not functioning correctly and the image was not centered.
expected result
image one
vs what I got when using tailwind with ant-design
image two
turns out tailwind will change default image display property from "inline-block" to "block" and breaks tailwind image preview component
I resolved my issue by reseting display property on images
img {
display: unset !important;
}
apart from this little tweaks you will be good to go using both of them
There's no problem to use Tailwind CSS and Ant Design together.
Tailwind CSS could be used to custom styling on Ant Design components.
Check this link to see an example with Next, Ant Design and Tailwind CSS:
https://github.com/plamworapot/next-antd-tailwindcss
You can use Bootstrap with ant design right? Think Tailwind same as Bootstrap. Tailwind is a CSS library you can use it with any setup and framework there no extra configurations needed. Just pass the Tailwind class names.
When it comes to theming. It's a context. Ant design will grab it's context and tailwind grab it's. We don't need to think or worry about it
Well for me I needed to use tailwind to override the default ant design css styling so what I ended up doing was adding important:true to the tailwind config object (as per tailwind docs tailwind config docs for important config)
module.exports = {
....,
important:true,
};
I know some people frown at using important (as do I) but I think this is one of the uses it was created for.

Minify CSS class names with Angular CLI

I'm looking for a way to improve performance by minifying my app's CSS class names. This approach is used by large websites and is also described in this article.
Does anybody have an idea on how to do this with Angular CLI v10+ ? Ideally I'd want to add a webpack plugin while keeping the CLI for compilation, or a similar approach with minimal footprint, obviously for production builds only.
You can achieve something using the ViewEncapsulation API. By default it uses Emulated which generate large CSS class names. If you change that in your components to ShadowDom. This will encapsulate the styles and will shift everything to use Shadow DOM. With Shadow DOM the styles won't be leaked outside the components. You have to test it though and check for browsers support because it's not supported everywhere. Also, global styles might not work as you expect.
Edit: I also found this interesting article that explain something similar using Angular.

How can I get vuetify typography classes to work?

Vuetify supposedly has the following typography classes available:
https://vuetifyjs.com/en/styles/text-and-typography/
However, they don't work with my vue-cli project. The color ones such as red--text work fine, as well others such as text-lowercase and text-uppercase work fine as well. But things such as text-h1, text-caption, etc., no dice.
I'm guessing I have some sort of mis-install, where are these classes supposed to come from?
My project is pretty good sized now (over 30 components) and everything else vue/vuetify is working fine.
The typography classes are recent, need to upgrade to latest veutify version (2.3.1). I was using an older version that didn't have them.

Material-UI without React / just with vanilla HTML, CSS & JS? Possible?

I learned Vanilla JS for some months and now I am building some basic things...
I wanna learn React soon, but for now I want to practice Vanilla JS a little bit before moving on...
I am searching a "CSS Framework" for easy prototyping (or: not caring so much about custom styles) and I really like the style of Material-UI. And because I want to learn React soon anyway, I don't really want to dig into two such things (like extra learning materialize or bootstrap).
Can I use Material-UI without React, with just vanilla HTML, CSS & JS?
Can I just use the CSS styling side of things, or will this result in problems?
And can you maybe give me some tips on how to do it? Is it as simple as including a style and link tag to my HTML?
Yes you can, also an alternative is Materialise, kind of a bootstrap duplicating material ui.
I used it with some of my React projects.
Yes. It is possible. Depending on what your doing, could get messy.
You can use the css classes from Material UI and native html types it renders.
<h4 class="MuiTypography-root MuiTypography-h4">Hello Bud</h4>
A Non JSX approach below is
https://reactjs.org/docs/react-without-jsx.html
Each JSX element is just syntactic sugar for calling React.createElement(component, props, ...children). So, anything you can do with JSX can also be done with just plain JavaScript.
Use the React/Material-UI files from CDN https://github.com/mui-org/material-ui/tree/master/examples/cdn/
ReactDOM
.render(
React.createElement(
MaterialUI.Typography,
{variant: "h4"},
"Hello Bud"),
document.getElementById('hello-example')
);
The above will render a Typography Component from Material UI within a dom node with id "hello-example"
yes, I guess this is possible. But maybe not Material-UI. Take a look at Material Component Web which is based on native vanilla methods such SASS/CSS and native JS.
I have even managed to integrate this lib with some React projects of mine.
material-components-web works with vanilla html + javascript
based on material-design-lite

(React-redux front-end developing) should I use css or add another framework?

I am working on a web project. I use react-redux for this. I did nearly everything in back-end. But I would like to improve my project's visual side(I mean front-end side). I am currently using bootstrap/reactstrap. Is there a way to manipulate bootstrap? Or should I use css? Any suggestion would be helpfull.
If you are still starting the UI then I would suggest going for flexbox. You can use Bulma framework which is very good. I f you want to go ahead with bootstrap then you have only to edit the css. You can also make you of scss which makes your life more easier.
These are the best front-end libraries for react applications
https://materializecss.com/
https://ant.design/docs/react/introduce
use the styled-components npm package. it will improve your CSS code. and also you can pass the props to the styled-components and etc.
read a document enter link description here
if you want to animate your page, my suggestion is react-transition-group.
Yes , you can use css as external file and import in your file . Also inline css support in react components ,the code like
class MyHeader extends React.Component {
render() {
return (
<div>
<h1 style={{color: "red"}}>Hello Style!</h1>
<p>Add a little style!</p>
</div>
);
}
}
There are css styling libraries available
materializecss
material-ui
semantic-ui
For the front end, you can use material-ui. Really complete but not easy to use for a new.
https://material-ui.com/components/buttons/#contained-buttons
YOu can also use styled components. It's really easy.
https://www.styled-components.com/

Resources