
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
@shipengine/elements
Advanced tools
ShipEngine Elements is a collection of React components that provide shipping functionality through a standardized interface. This guide provides the essential steps for creating new elements in the ShipEngine Elements library.
Each element is composed of:
libs/elements/src/elements/new-element/
├── index.ts # Export file
├── new-element.tsx # Main element file
├── __stories__/ # Storybook stories
│ └── new-element.stories.tsx
└── __tests__/ # Jest tests
└── new-element.test.tsx
mkdir -p libs/elements/src/elements/new-element/{__stories__,__tests__}
libs/elements/src/elements/new-element/new-element.tsx
import { ErrorFallback } from "@components/error-fallback";
import { Button, Typography } from "@shipengine/giger";
import { useTranslation } from "react-i18next";
import { createElement } from "../../create-element";
import { en } from "../../locales";
/**
* Props for the NewElement component
*/
export type NewElementProps = {
/**
* Optional title to display
*/
title?: string;
/**
* Callback function when action is performed
*/
onClick?: (value: any) => void;
};
/**
* # NewElement Component
*
* Brief description of what this element does and its purpose.
*/
export const Component = ({ title = "New Element Title", onClick }: NewElementProps) => {
const { t } = useTranslation();
const handleOnClick = () => {
const value = { name: "ShipEngine Elements" };
onClick?.(value);
};
return (
<div>
<Typography variant="h2">{title}</Typography>
<Typography variant="body1">{t("description")}</Typography>
<Button onClick={handleOnClick}>{t("actionButton")}</Button>
</div>
);
};
/**
* # NewElement Element
*
* The registered element that can be used directly in applications.
*/
export const Element = createElement(Component, ErrorFallback, {
css: {
height: "100%",
maxWidth: "800px",
minWidth: "440px",
width: "100%",
},
resources: { en },
});
export type ElementProps = React.ComponentProps<typeof Element>;
libs/elements/src/elements/new-element/index.ts
export * as NewElement from "./new-element";
export type { NewElementProps } from "./new-element";
libs/elements/src/locales/en/new-element.json
{
"description": "This is a new Element!",
"actionButton": "Continue"
}
libs/elements/src/elements/new-element/__stories__/new-element.stories.tsx
import type { Meta, StoryObj } from "@storybook/react";
import { NewElement } from "../new-element";
const meta: Meta<typeof NewElement.Element> = {
title: "Elements/NewElement",
component: NewElement.Element,
parameters: {
layout: "centered",
},
tags: ["autodocs"],
};
export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {
args: {
title: "Default Example",
},
};
export const CustomTitle: Story = {
args: {
title: "Custom Element Title",
},
};
Add your new element to libs/elements/package.json exports:
{
"exports": {
"./new-element": {
"source": "./src/elements/new-element/index.ts",
"import": {
"types": "./dist/types/elements/new-element/index.d.ts",
"default": "./dist/esm/elements/new-element/index.js"
},
"require": {
"types": "./dist/types/elements/new-element/index.d.ts",
"default": "./dist/cjs/elements/new-element/index.cjs"
}
}
}
}
Add your element to libs/elements/src/index.ts:
export * from "./elements/new-element";
FAQs
Unknown package
The npm package @shipengine/elements receives a total of 35 weekly downloads. As such, @shipengine/elements popularity was classified as not popular.
We found that @shipengine/elements demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 45 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
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.