Coder Social home page Coder Social logo

asvny / building-realworld-user-interfaces-using-tailwind Goto Github PK

View Code? Open in Web Editor NEW
101.0 6.0 19.0 4.58 MB

Demo of building real-world UIs using TailwindCSS

License: MIT License

CSS 2.06% HTML 91.72% JavaScript 6.23%
tailwindcss postcss user-interface css

building-realworld-user-interfaces-using-tailwind's Introduction

Building-real-user-interfaces-using-tailwind

Examples of building realworld user interfaces using Tailwind.css

The websites that I have tried to replicate are:

Shopify

Netlify Atlassian

Thoughts on Atomic CSS

Since there are already lots of posts, I'll just brief the intro part. For a very long time (from 2014), my preference has always been

  • SUIT CSS for UI components like buttons, forms, base layouts etc..,
  • Atomic CSS for almost all other usecases.

Why ? It is because when you work on a greenfield project, the base UI components doesn't change much and mostly it usually changes in color or typography and main project UIs change very frequently and so therefore it is necessary to consider that deletion of code should become easier when coding new UIs. To achieve this, using atomic css in the main product for layouts and all other cases, it becomes the only source. So, when a designer comes in with a new UI, it feels quite easier to delete the already coded template or react/ember/vue or in this case any other component and quickly again, we can iterate on the new UI without writing any additional CSS but only the template part.

When things get messy ?

  • Using :nth-child, :only-child etc.., selector is quite uneasy. Simple example which I can illustrate is
<!--
Usually in frontend frameworks, we use .map(js) or #each(hbs) to loop over data, it becomes difficult
to achieve the following example 
-->

<ul class="p-0 m-0">
  { data.map(item => `
  <li class="bt-gray-500">{item.title}</li>
  `) }
</ul>

<!-- Outcome

Rachel Green 
---------------
Monica Geller 
---------------
Joey Tribbiani 
---------------
Chandler Bing  
--------------- (This should not be displayed)

Expected

Rachel Green 
---------------
Monica Geller 
---------------
Joey Tribbiani 
---------------
Chandler Bing

-->
  • When you have to deal with states like hover, active, focus etc., (but luckly Tailwind.css came with a solution)
  • Responsive design - You get to add a lot of classes and becomes quite unfamiliar what the element does at a single glance.

Author

Annamalai Saravanan

building-realworld-user-interfaces-using-tailwind's People

Contributors

asvny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.