Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stitches/core

Package Overview
Dependencies
Maintainers
3
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stitches/core

The modern CSS-in-JS library

  • 1.2.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
190K
decreased by-8.86%
Maintainers
3
Weekly downloads
 
Created

What is @stitches/core?

@stitches/core is a CSS-in-JS library that provides a performant, flexible, and feature-rich way to style your applications. It allows you to write CSS with JavaScript, offering features like theming, responsive design, and utility-first styling.

What are @stitches/core's main functionalities?

Styling Components

This feature allows you to create styled components using the `styled` function. You can define styles directly in your JavaScript code and apply them to HTML elements.

const { styled } = require('@stitches/core');

const Button = styled('button', {
  backgroundColor: 'blue',
  color: 'white',
  padding: '10px 20px',
  borderRadius: '5px',
  '&:hover': {
    backgroundColor: 'darkblue'
  }
});

Theming

Theming allows you to define different themes for your application. You can create multiple themes and switch between them dynamically.

const { createTheme } = require('@stitches/core');

const darkTheme = createTheme({
  colors: {
    background: 'black',
    text: 'white'
  }
});

const lightTheme = createTheme({
  colors: {
    background: 'white',
    text: 'black'
  }
});

Responsive Design

This feature allows you to define responsive styles using media queries. You can specify different styles for different screen sizes.

const { styled } = require('@stitches/core');

const Container = styled('div', {
  width: '100%',
  '@media (min-width: 768px)': {
    width: '50%'
  }
});

Utility-First Styling

Utility-first styling allows you to create utility classes that can be reused across your application. This promotes consistency and reduces the amount of CSS you need to write.

const { css } = require('@stitches/core');

const utilityClass = css({
  margin: '10px',
  padding: '20px',
  backgroundColor: 'lightgray'
});

Other packages similar to @stitches/core

Keywords

FAQs

Package last updated on 06 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc