33
loading...
This website collects cookies to deliver better user experience
Big companies have spent large sums of money on R&D to make their UIs easy to use and to look nice. Having a repository of pre-built components at your fingertips means you can hit the ground running with your new or existing project. You no longer have to write all the logic for how a button operates/looks, simply import it and continue building.
Their utility functions / surgical classes are really useful. In bootstrap and tailwind, these are some of the main selling points. Here are some simple examples of what you can do with these frameworks.
<p className="text-gray-500">{person.email}</p>
<span className="text-white-50">{person.email}</span>
const classes = useStyles();
...
<span className={classes.span}>{person.email}</span>...const
useStyles = makeStyles((theme) => ({
span: {
color: 'rgba(255,255,255,.5)'
}
}
Spacing modifiers provide consistent ways of spacing components in your UI. No more specific pixel margin or padding that makes the UI slightly off at different viewports
Styling with these utilities becomes faster and faster the more you learn the framework. There will be a bit of a learning curve, but it will pay dividends in a short period.
The frameworks are usually based on a set REM size, meaning your UI should scale reasonably well when people use different zoom sizes or screens.
The flex-box utilities are very well documented and make mobile/desktop development EXTREMELY easy. Here’s an example with bootstrap, these three columns will correctly display at any viewport size (within reason).
<div class="container">
<div class="row">
<div class="col">
Column
</div>
<div class="col">
Column
</div>
<div class="col">
Column
</div>
</div>
</div>
Theming is a big thing in these frameworks, just because you pick one doesn’t mean your site now has to look like the base theme. You can add a lot of customization, like primary colours, box-sizing, borders, etc. Most of the frameworks have a tone of documentation on how to do this so I won’t go into it.
Mobile AND desktop first. Most of the design frameworks have a bunch of help when it comes to layout. These make it super easy to operate in the mindset of “what does this look like on mobile”. Using things like flex-box and rows/columns are easy to set for different viewports. E.g. making something span 3 columns on desktop but 3 rows on mobile.
Firefox or Chrome or Safari? These libraries tend to handle slight differences in browsers and browser standards. Their maintainers will also be constantly checking comparability with a set of standard browsers you may not have the man/women power to do yourself.
CSS is a lot harder than people think. I think that’s because the actual hard part is maintenance, not so much adding something in for right now. It gets exponentially harder to manage for each line added to the system. Moving this to the component level means there is a direct link between the functional side and the design side. This means when refactoring components, you won’t be worried about deleting CSS that’s actively used for something else, you’ll just kill the component and the styles will die with it.