
Research
TeamPCP Compromises Telnyx Python SDK to Deliver Credential-Stealing Malware
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.
@audius/harmony
Advanced tools
Harmony is design system focused on collaboration, reusability, and scalability.
It aims to harmonize code and Figma, provide a shared language for designers and developers, and provide consistent, reusable components for use across our platforms.
built with ❤️ from the team @Audius.
Full documentation can be found here: Harmony Docs
Install @audius/harmony:
npm install --save @audius/harmony
Due to an issue with react-virtualized, if using vite you must also install a plugin to fix the build: https://www.npmjs.com/package/esbuild-plugin-react-virtualized
npm install --save-dev esbuild-plugin-react-virtualized
Follow the instructions to add the plugin to your vite config:
// vite.config.js
import { defineConfig } from 'vite'
import fixReactVirtualized from 'esbuild-plugin-react-virtualized'
export default defineConfig({
optimizeDeps: {
esbuildOptions: {
plugins: [fixReactVirtualized]
}
}
})
For more information, see: https://github.com/bvaughn/react-virtualized/issues/1722
Import styles exported by Harmony
import '@audius/harmony/dist/harmony.css'
Setup the ThemeProvider exported by Harmony
import { ThemeProvider as HarmonyThemeProvider } from '@audius/harmony'
const App = () => {
return <HarmonyThemeProvider theme='day'>...</HarmonyThemeProvider>
}
In order use emotion yourself, follow their documentation for setting up the css-prop
If using typescript you will need to:
import '@emotion/react'
import type { HarmonyTheme } from '@audius/harmony'
declare module '@emotion/react' {
export interface Theme extends HarmonyTheme {}
}
{
"compilerOptions": {
"jsxImportSource": "@emotion/react",
...
}
}
import { Button, Flex } from '@audius/harmony'
const App = () => {
return (
<Flex gap='m'>
<Button variant='secondary'>Click This!</Button>
<Button>Click That!</Button>
</Flex>
)
}
Run storybook (docs site):
npm run storybook
A Contribution Guide is available here.
Harmony includes utilities to help build responsive designs consistently across the application.
The breakpoints module provides standardized screen size breakpoints and media query helpers:
import { breakpoints } from '@audius/harmony'
// Access specific breakpoint values
const tabletWidth = breakpoints.values.md // 1024
// Use predefined media queries
const mobileQuery = breakpoints.down.sm // (max-width: 768px)
const desktopQuery = breakpoints.up.md // (min-width: 1025px)
const tabletQuery = breakpoints.between.sm_md // (min-width: 769px) and (max-width: 1024px)
// Create custom media queries
const customQuery = breakpoints.createCustomQuery(500, 800) // (min-width: 500px) and (max-width: 800px)
For reactive responsive designs, use the useMedia hook:
import { useMedia } from '@audius/harmony'
const MyComponent = () => {
const {
// Common device categories
isMobile, // <= 768px
isTablet, // > 768px and <= 1024px
isDesktop, // > 1024px
// Detailed breakpoint checks
isExtraSmall, // <= 480px
isSmall, // <= 768px
isMedium, // <= 1024px
// Check custom queries
matchesQuery
} = useMedia()
return (
<div>
{isMobile && <MobileLayout />}
{isTablet && <TabletLayout />}
{isDesktop && <DesktopLayout />}
{/* Check a custom query */}
{matchesQuery('(orientation: portrait)') && <PortraitContent />}
</div>
)
}
For more maintainable responsive styling with Emotion, use the createResponsiveStyles utility:
import { useMedia, createResponsiveStyles } from '@audius/harmony'
const MyComponent = () => {
const media = useMedia()
const { spacing } = useTheme()
// Define styles for different breakpoints
const styles = createResponsiveStyles(media, {
// For a single element
container: {
base: {
padding: spacing.l,
display: 'flex'
},
mobile: {
padding: spacing.m,
flexDirection: 'column'
},
tablet: {
padding: spacing.l,
flexDirection: 'row',
flexWrap: 'wrap'
}
},
// Include multiple elements in one call
header: {
base: { fontSize: '24px' },
mobile: { fontSize: '18px' }
},
// Use functions for complex conditional logic
content: {
base: { marginTop: spacing.m },
mobile: (currentMedia) => ({
// isExtraSmall is for phones (≤ 480px)
...(currentMedia.isExtraSmall && {
marginTop: spacing.s,
fontSize: '14px'
})
})
}
})
return (
<div css={styles.container}>
<h1 css={styles.header}>Title</h1>
<div css={styles.content}>Content</div>
</div>
)
}
The utility applies styles in this order, with later ones overriding earlier ones:
This approach improves maintainability by:
For complex components with many responsive styles, it's beneficial to extract the styles into a separate file:
// Button.styles.ts
import { createResponsiveStyles, useMedia } from '@audius/harmony'
type MediaContext = ReturnType<typeof useMedia>
export const getButtonStyles = (
media: MediaContext,
spacing: Record<string, string | number>
) => {
return createResponsiveStyles(media, {
container: {
base: { display: 'flex', padding: spacing.m },
mobile: { flexDirection: 'column' }
}
// More styles...
})
}
// Button.tsx
import { getButtonStyles } from './Button.styles'
export const Button = () => {
const media = useMedia()
const { spacing } = useTheme()
// Import styles from separate file
const styles = getButtonStyles(media, spacing)
return <div css={styles.container}>{/* Component content */}</div>
}
This pattern:
FAQs
The Audius Design System
The npm package @audius/harmony receives a total of 4 weekly downloads. As such, @audius/harmony popularity was classified as not popular.
We found that @audius/harmony demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.

Security News
/Research
Widespread GitHub phishing campaign uses fake Visual Studio Code security alerts in Discussions to trick developers into visiting malicious website.