
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@utrecht/web-component-library-react
Advanced tools
Component library bundle for the Municipality of Utrecht based on the NL Design System architecture
The @utrecht/web-component-library-stencil
package contains the actual implementation of every web component, while the @utrecht/web-component-library-react
only contains wrapper React components to provide JSX elements for every Web Component. The implementation of each component will be loaded separately and on-demand, so including the entire component library will not slow down your application.
Install both packages to use React web components in your project:
npm install --save-dev --save-exact \
@utrecht/web-component-library-react \
@utrecht/web-component-library-stencil
For example, using Next.js:
import Head from "next/head";
import { UtrechtHeading, UtrechtParagraph, UtrechtDocument } from "@utrecht/component-library-react";
export default function ExamplePage() {
return (
<UtrechtDocument>
<Head>
<title>Example Page</title>
</Head>
<main>
<UtrechtHeading level={1}>Home</UtrechtHeading>
<UtrechtParagraph>Hell, world!</UtrechtParagraph>
</main>
</UtrechtDocument>
);
}
Since the implementation of the web components needs to be loaded in the browser, include the following effect to import web component library from @utrecht/web-component-library-stencil
, in Next.js this would be in _app.ts
:
useEffect(() => {
import("../public/utrecht/utrecht.esm.js");
}, []);
When you're working on a React project and the React component is available, currently you should probably use the React component.
The web components are still experimental. In the future some components might be most convenient to use as web component, and some components might be released exclusively as web component.
FAQs
Component library bundle for the Municipality of Utrecht based on the NL Design System architecture
The npm package @utrecht/web-component-library-react receives a total of 143 weekly downloads. As such, @utrecht/web-component-library-react popularity was classified as not popular.
We found that @utrecht/web-component-library-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.