![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
jss-preset-default
Advanced tools
The jss-preset-default package provides a set of default plugins for JSS (JavaScript Style Sheets). It includes a collection of plugins that help with various aspects of styling in JavaScript, such as vendor prefixing, nested selectors, and more.
Vendor Prefixing
Automatically adds vendor prefixes to CSS properties to ensure compatibility across different browsers.
const jss = create(preset());
const styles = {
button: {
display: 'flex',
justifyContent: 'center'
}
};
const { classes } = jss.createStyleSheet(styles).attach();
Nested Selectors
Allows the use of nested selectors within your styles, similar to how you would use them in Sass or Less.
const jss = create(preset());
const styles = {
container: {
'&:hover': {
backgroundColor: 'blue'
}
}
};
const { classes } = jss.createStyleSheet(styles).attach();
Global Styles
Enables the definition of global styles that apply to the entire document.
const jss = create(preset());
const styles = {
'@global': {
body: {
margin: 0,
padding: 0
}
}
};
const { classes } = jss.createStyleSheet(styles).attach();
styled-components is a library for React and React Native that allows you to use component-level styles in your application. It uses tagged template literals to style your components. Unlike jss-preset-default, styled-components is more tightly integrated with React and offers a more component-centric approach to styling.
Emotion is a performant and flexible CSS-in-JS library. It allows you to style applications quickly with string or object styles. Emotion offers a similar set of features to jss-preset-default but is known for its performance and flexibility, making it a popular choice for large-scale applications.
Aphrodite is a framework-agnostic CSS-in-JS library that focuses on performance and ease of use. It provides features like media queries and pseudo-selectors. Compared to jss-preset-default, Aphrodite is simpler and more lightweight, making it suitable for smaller projects or those that do not require extensive styling capabilities.
Default preset for JSS with selected plugins.
See our website jss-preset-default for more information.
Using npm:
npm install jss-preset-default
or using yarn:
yarn add jss-preset-default
FAQs
Default preset for JSS with selected plugins.
The npm package jss-preset-default receives a total of 275,824 weekly downloads. As such, jss-preset-default popularity was classified as popular.
We found that jss-preset-default demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.