
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
@healthcatalyst/react-cashmere
Advanced tools
First you will need an existing react app or create a new project using create react app.
npx create-react-app my-app
Install the peer dependencies (You will need React 17.x.x|18.x.x
and Material UI 5.8.x
)
npm install --save @mui/lab @mui/material
Now you can install React Cashmere and fonts
npm install --save @healthcatalyst/react-cashmere
# optional install fonts and icons sets
npm install --save sass font-awesome notosans-fontface @healthcatalyst/cashmere
Create a sass file to import the desired fonts. These fonts are optional if your app does not need them.
/* src/fonts.scss */
$fa-font-path: "~font-awesome/fonts";
@import "~font-awesome/scss/font-awesome";
$notosans-fontface-path: "~notosans-fontface/fonts";
@import "~notosans-fontface/scss/notosans-fontface-allweight";
$hc-icons-font-path: "~@healthcatalyst/cashmere/hcicons";
@import "~@healthcatalyst/cashmere/hcicons/hcicons";
Now you are ready to wrap your app with the ThemeProvider higher order component.
The ThemeProvider will take care of all the cashmere styling and apply it so most Material UI child components are properly themed. There are also custom HC components such as Icon
, Navbar
, etc available.
/* src/index.js */
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import { ThemeProvider, themes } from "@healthcatalyst/react-cashmere";
import "./fonts.scss"; /* optional scss fonts import */
const [lightTheme, darkTheme] = themes;
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<ThemeProvider theme={lightTheme}>
<App />
</ThemeProvider>
</React.StrictMode>
);
/* src/App.js */
import React from "react";
import Typography from "@mui/material/Typography";
import Box from "@mui/material/Box";
import Button from "@mui/material/Button";
import { Icon, Navbar } from "@healthcatalyst/react-cashmere";
const App = (props) => {
return (
<Box mt={"53px"} p={2}>
<Navbar
position="fixed"
appIcon="My App"
brandIcon={<Icon size="large" icon={"hci-catalyst-logo"} />}
linkContent={[]}
rightContent={<Box p={2}>Welcome, User!</Box>}
/>
<Typography variant="h1" pb={2}>
Hello Cashmere!
</Typography>
<Typography variant="subheading1">
This app is using React, Material UI and themed with Cashmere.
</Typography>
<Typography variant="h2" pt={3}>
Butons
</Typography>
<Button color="primary">Button</Button>
<Button color="secondary">Button</Button>
<Typography variant="h2" pt={3}>
Icons
</Typography>
Font Awesome: <Icon size="large" icon={"fa-cog"} />
<br />
Health Catalyst Icons: <Icon size="large" icon={"hci-catalyst-logo"} />
<br />
</Box>
);
};
export default App;
More information about contributing to the repo can be found here:
FAQs
React version of @HealthCatalyst/Fiber.Cashmere
The npm package @healthcatalyst/react-cashmere receives a total of 46 weekly downloads. As such, @healthcatalyst/react-cashmere popularity was classified as not popular.
We found that @healthcatalyst/react-cashmere demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 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.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.