0.0.1 • Published 2 years ago

@noodlio/stitches v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Noodle Stitches

A Stitches CSS configuration that is based on a lot of principles from Tailwindcss like space, font sizes, radii...etc and also provides dark and light mode functionality.

Install

Firstly you need to install the peer dependencies:

npx install-peerdeps @noodlio/stitches

Then you install the main @noodlio/stitches library.

# npm
npm install @noodlio/stitches

# yarn
yarn add @noodlio/stitches

# pnpm
pnpm install @noodlio/stitches

Included

  • Dark/light mode functionality that is automatically initialised based on the system preferences.
  • useToggleTheme hook to toggle between dark and light mode.
  • Color palette from @radix-ui/colors
  • Inter font family.
  • Typography rules like fonts, font sizes, font weights, line heights, letter spacings from Tailwindcss.
  • Border radius values from Tailwindcss.
  • Space rules for margins, paddings and also sizing rules for height, width...etc
  • Z indices
  • Shadows
  • transitions
  • border widths

Usage

Firstly import the StitchesProvider component and wrap your application around it.

import { StitchesProvider } from '@noodlio/stitches';

<StitchesProvider>
  <App />
</StitchesProvider>;

To style your components, simply import the styled function:

import { styled } from '@noodlio/stitches';

const Text = styled('p', {
  fontSize: '$2xl',
  color: '$pink10',
});

License

Copyright 2022 Ahmed Elsakaan.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.