Git Product home page Git Product logo

stitchwind's Introduction

Stitchwind

This library helps bridge the gap between Tailwind and Stitches. Considering Stitches was somewhat inspired by Tailwind, I thought we should be able to use the design tokens and utilities from Stitches' progenitor.

Installation

    npm install stitchwind

Usage

Without Customization

If you don't want to customize Stitchwind at all you can just simply pass it to Stitches' createStyled method to create your Stitches' functions.

    import stitchwind from 'stitchwind'
    import { createStyled } from '@stitches/react'

    export const { styled, css } = createStyled(stitchwind)

Changing Prefix

    import stitchwind, { usePrefix } from 'stitchwind'
    import { createStyled } from '@stitches/react'

    const customPrefixedConfig = usePrefix('@', stitchwind);
    export const { styled, css } = createStyled(customPrefixedConfig);

Current Support

Currently Stitchwind only supports tokens and breakpoints from Tailwind. Utilities to come soon.

Available Breakpoints

Every breakpoint is loaded from Tailwind, $sm through $xl

Available Tokens

Colors

Every color and color scale is loaded ie. $black or $indigo600 into Stitches' colors token.

Spacing

Every spacing size is loaded ie. $0 through $64 and $px

Sizes

Sizes are loaded using the set from Tailwind's width property. This allows for everything from spacing plus all the fractional sizes $1/2 through $11/12 and $auto, $full, and $screen. Currently screen is equivalent to 100vw but may later be transformed into $screenH and $screenW with the respective viewport units used for each.

Fonts

Fonts from Tailwind are loaded as comma delimited strings and include $sans, $serif, and $mono

Font Weights

Every font weight is loaded, $hairline through $black

Font Sizes

Every font size is loaded, $xs through $6xl

Line Heights

Every line height is loaded, $3 through $10 and $none through $loose

Letter Spacings

Every letter spacing is loaded, $tighter through $widest

Border Widths

Every border width is loaded, $0 through $8 including $default for 1px

Border Radius

Every border radii is loaded, $none through $full

Box Shadow

Every box shadow is loaded, $xs through $2xl, $inner, $outline, and $none

Z Index

Every z-index is loaded, $0 through $50 and $auto

License

Licensed under the MIT License, Copyright © 2020-present Hunter Miller.

See LICENSE for more information.

stitchwind's People

Contributors

arthyn 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

Watchers

 avatar  avatar  avatar  avatar

stitchwind's Issues

Tailwind 2 support

Hey, this project is awesome!

I was looking for a way to implement a design system on top of Tailwind UI and using stitches as the CSS in JS engine, and you made a generator! ❤️

Are you planning to support tailwind 2 now that it's stable?

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.