Socket
Socket
Sign inDemoInstall

@mui/styled-engine

Package Overview
Dependencies
66
Maintainers
10
Versions
70
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @mui/styled-engine

styled() API wrapper package for emotion.


Version published
Weekly downloads
3.7M
increased by2.07%
Maintainers
10
Install size
2.68 MB
Created
Weekly downloads
 

Package description

What is @mui/styled-engine?

The @mui/styled-engine package is a styling solution for MUI, a popular React UI framework. It acts as an abstraction layer over different styling solutions, allowing developers to switch between different styled engines, such as emotion or styled-components, without changing their MUI component usage. It provides a consistent API for defining styles for MUI components.

What are @mui/styled-engine's main functionalities?

Customization of MUI components

This feature allows developers to customize MUI components using a familiar CSS-in-JS syntax. The code sample demonstrates how to create a custom styled version of an MUI Button component with a specific background color and hover state.

{"const StyledButton = styled(Button)({ backgroundColor: 'lightblue', '&:hover': { backgroundColor: 'blue' } }); return <StyledButton>Styled Button</StyledButton>;"}

Theming support

The package provides theming support, enabling developers to define a theme object and apply it to MUI components using a ThemeProvider. The code sample shows how to define a custom theme with a primary color and apply it to a Button component.

{"const theme = createTheme({ palette: { primary: { main: '#007bff' } } }); return <ThemeProvider theme={theme}><Button color='primary'>Themed Button</Button></ThemeProvider>;"}

Style overrides

Developers can use the package to override default styles of MUI components at the theme level. The code sample illustrates how to override the font size of all Button components within a theme.

{"const theme = createTheme({ components: { MuiButton: { styleOverrides: { root: { fontSize: '1rem' } } } } }); return <ThemeProvider theme={theme}><Button>Button with Style Overrides</Button></ThemeProvider>;"}

Other packages similar to @mui/styled-engine

Changelog

Source

v5.15.14

<!-- generated comparing v5.15.13..master -->

Mar 18, 2024

A big thanks to the 15 contributors who made this release possible. This release was mostly about 🐛 bug fixes and 📚 documentation improvements.

Readme

Source

@mui/styled-engine

This package is a wrapper around the @emotion/react package. It also provides a shared interface that can be used with other styled engines, like styled-components. It is used internally in the @mui/system package.

Documentation

Visit https://mui.com/material-ui/integrations/styled-components/ to view the full documentation.

Keywords

FAQs

Last updated on 19 Mar 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc