
Research
/Security News
10 npm Typosquatted Packages Deploy Multi-Stage Credential Harvester
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.
@fluentui/react-theme
Advanced tools
React Theme for Fluent UI React
Import a theme and tokens:
import { webLightTheme, tokens } from '@fluentui/react-components';
Pass the theme to the FluentProvider:
<FluentProvider theme={webLightTheme}>
<App />
</FluentProvider>
Use the tokens in your styles:
const useStyles = makeStyles({
root: {
color: tokens.colorNeutralForeground1,
},
});
To use a theme based on a custom brand ramp, use the createXXXTheme function:
import { createWebLightTheme } from '@fluentui/react-components';
const customBrandRamp: BrandVariants = {
10: `#2b2b40`,
// ...
160: `#e8ebfa`,
};
const customTheme = createWebLightTheme(customBrandRamp);
The color tokens are generated by token pipeline. Do not edit colors directly. Instead, update the token pipeline first and once the changes are merged there, run:
yarn token-pipeline
To add a new color token, besides updating the token pipeline, you also need to update corresponding typings and the tokens object in src/tokens.ts.
To update any tokens not related to colors, update the values directly in this package.
styled-components is a popular library for styling React applications using tagged template literals. It allows for defining component-level styles and supports theming through a ThemeProvider. Compared to @fluentui/react-theme, styled-components offers more flexibility in defining styles but does not come with a predefined set of UI components.
Emotion is a performant and flexible CSS-in-JS library that allows for writing styles with JavaScript. It supports theming through a ThemeProvider and offers a similar API to styled-components. Emotion is more focused on providing low-level styling capabilities, whereas @fluentui/react-theme is tailored for theming Fluent UI components.
Material-UI is a popular React UI framework that follows Google's Material Design guidelines. It provides a comprehensive set of components and theming capabilities. While @fluentui/react-theme is specific to Fluent UI components, Material-UI offers a broader range of components and a different design language.
FAQs
Fluent UI themes
The npm package @fluentui/react-theme receives a total of 278,777 weekly downloads. As such, @fluentui/react-theme popularity was classified as popular.
We found that @fluentui/react-theme demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 open source maintainers 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.

Research
/Security News
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.