This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react" | |
import tw from "tailwind.macro" | |
const MyComponent = tw.div` | |
bg-white | |
rounded-lg | |
overflow-hidden | |
border | |
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react" | |
import tw from "tailwind.macro" | |
import styled from "@emotion/styled" | |
const MyComponent = styled.div` | |
${tw`bg-white | |
rounded-lg | |
overflow-hidden | |
border`} | |
height: 409px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install tailwindcss -D | |
# -D installs it as a dev dependency |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// tailwind.config.js | |
module.exports = { | |
future: {}, | |
purge: [], | |
theme: { | |
extend: {}, | |
}, | |
variants: {}, | |
plugins: [], | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@tailwind base; | |
@tailwind components; | |
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
plugins: [ | |
// ... | |
require("tailwindcss"), | |
require("autoprefixer"), | |
// ... | |
], | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// tailwind.config.js | |
module.exports = { | |
theme: { | |
colors: { | |
indigo: '#5c6ac4', | |
blue: '#007ace', | |
red: '#de3618', | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p class="font-bold lg:font-semibold"> | |
Hello, I am a paragaph styled using Tailwind CSS. | |
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button class="px-4 py-2 font-semibold bg-blue-400 rounded">Click Me</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="md:flex"> | |
<div class="md:flex-shrink-0"> | |
<img | |
class="rounded-lg md:w-56" | |
src="https://bit.ly/34e2djy" | |
alt="Woman paying for a purchase" | |
/> | |
</div> | |
<div class="mt-4 md:mt-0 md:ml-6"> | |
<div class="text-sm font-bold tracking-wide text-indigo-600 uppercase"> |