4.2.0

Getting started

Install the package, import its styles once, wire the theme, and consume components — never copy them.

Install

pnpm add @oceanic-hub/brand-system

The package publishes to GitHub Packages and ships source, not a build — no dist in its exports — so your bundler transpiles it. In Next.js that is one line:

next.config.mjs
export default {
  transpilePackages: ['@oceanic-hub/brand-system'],
}

Import the styles once

app/globals.css
@import '@oceanic-hub/brand-system/styles';   /* fonts + palette + the token set + base layer */

That is the whole thing: one import, one token vocabulary, light and dark values inside it.

`styles/kano-product` is gone

There used to be a second import for an opt-in "Studio" layer. @OCE-1746 removed that entrypoint — it held the dark half of one token set, not a second design system — and every token it carried is now part of styles under a colour-free name. See the doctrine for the vocabulary and the rename table.

Tailwind v4 ignores node_modules

Tailwind will not generate the utilities the package's own components use unless you point it at the package source. Without this, a component renders unstyled and the failure looks like a token bug:

@source "../node_modules/@oceanic-hub/brand-system/src/**/*.{ts,tsx}";

Wire the theme

app/layout.tsx
import { ThemeProvider, ThemeScript } from '@oceanic-hub/brand-system'

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en" suppressHydrationWarning>
      <head>
        <ThemeScript />
      </head>
      <body>
        <ThemeProvider>{children}</ThemeProvider>
      </body>
    </html>
  )
}

ThemeScript applies the stored or OS theme before first paint — without it you get a flash of the wrong theme, which was the bug in the original this component replaced. Details on ThemeProvider.

Consume, do not copy

Never lift code out of this site into product code

The showcase is a demo, never a source. Downstream repos are contractually forbidden from importing or copying its page code, and a consumer's Agent contract has its Reviewer bounce production code lifted from the showcase.

In order: use what the package exports → compose product-specific things locally, which is ordinary product code and not a violation → send a genuinely missing primitive upstream. Never block a ticket on someone else's release.

Keep yourself honest mechanically

The package ships its own ESLint plugin. It catches the boundaries prose cannot:

eslint.config.js
import oceanic from '@oceanic-hub/brand-system/eslint-plugin'

It rejects arbitrary hex, drop shadows in every class string it can read — a third-party stylesheet is outside its reach, which is how the toast library's own shadow currently lands (see Toaster) — off-scale radius literals, backdrop blur, gradients, pure black and white, and colour-named utilities. The rules it enforces are argued in the doctrine.

What the API surface is

You are…Read
in this repothe component's *.contract.test-d.ts — compiler-enforced
in a consumer@oceanic-hub/brand-system/manifest — props, variants, layer

The contract tests are excluded from the published tarball, so they do not resolve inside node_modules. The manifest is the consumer-facing API surface, and it is what generates every props table on this site.

On this page