Pantheon Systems Next.js Kit
The @pantheon-systems/nextjs-kit
is a collection of utilities and Next.js
components for use in a Pantheon Decoupled Site built with Next.js.
Installation
To install this package to use in your application:
npm install @pantheon-systems/nextjs-kit
Usage
@pantheon-systems/nextjs-kit
is available as an ES or UMD module. Components
and utility functions are available as named exports with type declarations and
TSDoc comments included.
To import a component:
import { Component } from '@pantheon-systems/nextjs-kit';
To apply the styles from the nextjs-kit
, import the css into your main _app
component
import '@pantheon-systems/nextjs-kit/style.css'
...
To import a helper utility:
import { utility } from '@pantheon-systems/nextjs-kit';
Contributing
- Components should be created in the
src/components
folder and should include
a default export.
- Utilities for use in a Next.js app should be created in the
src/lib
directory.
- Utilities for use in this Library that are not exposed as part of the API
should be created in the
utils
directory
- Follow the established export pattern to maintain proper module resolution.
Please see the
Contributing guide in our monorepo
to contribute to the project.