Figma Kit for TailwindCSS

  • By Florentin / 珞辰
  • Last update: Jan 4, 2023
  • Comments: 7

Figma Kit for TailwindCSS

Information

Click the banner or here to get to the project

Limitations

  • Font styles need to be overwritten separately
  • Figma does not support spread shadow styles

Changelog (dd/mm/yy):

  • 24.11.2020: Update to Tailwind v2 colors
  • 10.08.2020: Update Heroicons
  • 30.07.2020: Add TailwindUI colors
  • 19.07.2020: Rename default colors
  • 25.04.2020: Update Heroicons
  • 12.04.2020: Fix line-height
  • 27.02.2020: Update Heroicons
  • 04.01.2020: Update to Auto Layout

Alternatively this repo also contains a .fig file that can be imported into Figma.

Need an easy way to import tailwind config styles? Check my Figma Plugin

Icons included: Heroicons UI by Steve Schoger and Adam Wathan

Screenshots

Colors

Typography

Buttons

Pills

Input

Shadows

Navigation

Forms

Alerts

Cards

Heroicons Outline

Heroicons Solid

Container

Spacing

Grid

Github

https://github.com/impulse/tailwindcss-figma-kit

Comments(7)

  • 1

    Add the TailwindUI colors

    The changelog indicates that TailwindUI colors are added, but when inspecting the latest .fig file, the colors available don't match the Tailwind UI documentation, and don't include the 50 shade of each color. Not sure what the mismatch is — is the wrong file published?

  • 2

    set tailwind's default line-height

    Problem

    line height of styles is not the same as tailwind.

    Expected

    Styles use same line-height as tailwind: 150%

    Details

    Tailwind sets 1.5 as the default line height in the base.css overwrite.

     * Tailwind custom reset styles
     */
    
    /**
     * 1. Use the user's configured `sans` font-family (with Tailwind's default
     *    sans-serif font stack as a fallback) as a sane default.
     * 2. Use Tailwind's default "normal" line-height so the user isn't forced
     *    to override it to ensure consistency even when using the default theme.
     */
    
    html {
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 1 */
      line-height: 1.5; /* 2 */
    }
    

    The tailwindcss-figma-kit currently uses Auto which represents 100% of the font defined line-height:

    Text boxes also start with automatic line height. When you switch between the fonts, we will adjust the line height to match the font’s default line height. That will make it easier to explore different fonts and have the text feel great either way. We won’t do this, of course, if you specify line height in pixels or as percents.

    (source)

  • 3

    Adding tailwind custom forms

    Do you have any interest in adding the custom forms library from tailwind to the Figma kit? It was made by Adam

    https://tailwindcss-custom-forms.netlify.com

  • 4

    Update to Tailwind v2

    Tailwind v2 is coming out today. I'll update the color scheme and adjust the components accordingly.

    Since adding the colors as a preview by hand is quite a tedious process, I'll be integrating something to automate it in my Figma plugin.

    • [x] Default Colors
    • [x] Components
    • [ ] Spacing
    • [ ] Container
    • [ ] New Plugin features
  • 5

    All colour styles are prefixed with `default/`

    When I import my config using the plugin, I need to add "default" as the prefix in order to overwrite the built-in styles. I'd prefer these to not have this prefix - this will help people using the plugin to overwrite the styles in the .fig.

    The font styles don't include default as a prefix.

  • 6

    Changing colours

    `is there a way I can change background colours for all my components at once without editing the existing styles? Eg: if I want my background to be light blue 500 instead of gay600 in figma , where can I make changes that would change everywhere with one click?

  • 7

    Card with header and footer/Desktop Not scaling correctly

    Hello, thanks for all the components! Our team found an issue while scaling the Card with header and footer/Desktop.

    Basically the footer stays up and the content box does not grows with the scaled card. Screen Shot 2021-04-13 at 6 20 00 PM

    We fixed it by doing this: Screen Shot 2021-04-13 at 6 21 02 PM

    Now it scales :) Screen Shot 2021-04-13 at 6 21 29 PM

    Thank you.