
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@gnist/component-utils
Advanced tools
@gnist/component-utils currently contains a single utility function for easily creating React components
from css classes (e.g. created with style(...)
from @vanilla-extract/css) or recipes created with
@vanilla-extract/recipes.
The function component has two overloads, for use with either a className string or a recipe function.
// Heading.css.ts
import { atoms } from "@gnist/themes/atoms.css.js";
import { style } from "@vanilla-extract/css";
export const heading = style([
{ float: "left" },
atoms({ margin: "none", typography: "subtitle-small" }),
]);
// Heading.tsx
import { component } from "@gnist/component-utils";
import { bannerHeading } from "./Heading.css.js";
export const Heading = component("Heading", heading, "h2");
// │ │ │
// The display name of the component ┘ │ │
// The className to use for the element ───────┘ │
// The default HTML element or React component to use ─┘
// ...later...
<Heading $as="h4" href="#anchor">
Now this is a h4
</Heading>;
// Box.css.ts
import { recipe } from "@vanilla-extract/recipes";
import { atoms } from "@gnist/themes/atoms.css.js";
export const box = recipe({
base: atoms({ display: "flex" }),
variants: {
density: {
default: atoms({ padding: "s" }),
compact: atoms({ padding: "xxs" }),
},
},
defaultVariants: { density: "default" },
});
// Box.tsx
import { component } from "@gnist/component-utils";
import { box } from "./Box.css.js";
export const Box = component("Box", box, "div");
// │ │ │
// The display name ───────────┘ │ │
// The recipe function ─────────────┘ │
// The default element or component ───────┘
// ...later...
<Box $as="span" density="compact">
Now the box has xxs padding and is a span
</Box>;
Note that component can be used with any React component that has a className prop,
not just HTML elements.
FAQs
Unknown package
The npm package @gnist/component-utils receives a total of 179 weekly downloads. As such, @gnist/component-utils popularity was classified as not popular.
We found that @gnist/component-utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.