Installation
Install the AbElements packages with your package manager and wire the theme.
Requirements
- Node.js 24 or newer
- Next.js 16 with the App Router
- React 19
Install the packages
pnpm add ab-nextjs-core ab-nextjs-components ab-nextjs-themenpm install ab-nextjs-core ab-nextjs-components ab-nextjs-themeExact versions
The packages move fast, so pin exact versions and upgrade them together.
Transpile them
The packages ship TypeScript sources, so list them in transpilePackages:
const nextConfig = {
transpilePackages: ['ab-nextjs-core', 'ab-nextjs-components', 'ab-nextjs-theme'],
};
export default nextConfig;Import the styles
Import order
Import the theme before the components, so the components can read its tokens.
@import 'ab-nextjs-theme/styles.css';
@import 'ab-nextjs-components/styles.css';