Unknown model· unknown
from ShareGPT 90K (shared ChatGPT conversations)
give me cheatsheet for tailwind css
- User
give me cheatsheet for tailwind css
- Assistant
Here's a cheatsheet for Tailwind CSS that covers some of the most commonly used classes:
Layout
container: sets max-width and centers contentmx-auto: sets horizontal margin to auto for centeringw-full: sets width to 100%h-full: sets height to 100%min-h-screen: sets minimum height to 100vh
Spacing
m-{size}: sets margin to a specific size (e.g. m-4 for margin of 1rem)p-{size}: sets padding to a specific size (e.g. p-4 for padding of 1rem)mt-{size},mb-{size},ml-{size},mr-{size}: sets margin or padding to a specific size on a specific side (e.g. mt-4 for margin-top of 1rem)mx-{size},my-{size}: sets margin or padding to a specific size on the x or y axis (e.g. mx-4 for margin-left and margin-right of 1rem)
Typography
text-{size}: sets font-size to a specific size (e.g. text-lg for font-size of 1.125rem)font-{weight}: sets font-weight to a specific weight (e.g. font-bold for font-weight of 700)text-{color}: sets text color to a specific color (e.g. text-red-500 for red text)uppercase: sets text to all uppercasetruncate: truncates text with ellipsis
Backgrounds
bg-{color}: sets background color to a specific color (e.g. bg-gray-200 for light gray)bg-{color}-{intensity}: sets background color to a specific color with a specific intensity (e.g. bg-blue-900 for dark blue)bg-cover: sets background-size to coverbg-center: sets background-position to center
Borders
border: sets border width to 1px, border-style to solid, and border-color to currentColorborder-{color}: sets border color to a specific color (e.g. border-gray-400 for medium gray)border-{side}: sets border width to a specific side (e.g. border-t for top border)rounded: sets border-radius to 0.25remrounded-{size}: sets border-radius to a specific size (e.g. rounded-lg for border-radius of 0.5rem)
Flexbox
- User
give me cheatsheet for chakra ui
- Assistant
Here's a cheatsheet for Chakra UI that covers some of the most commonly used components and props:
Components
Layout
Box: a basic box elementFlex: a flexible container with horizontal and vertical alignment optionsGrid: a responsive grid containerStack: a vertical stack of elements with options for spacing and alignment
Inputs
Button: a basic button elementInput: a text input elementTextarea: a multi-line text input elementSelect: a dropdown select element