
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@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 107 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 43 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
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.