Resources / Getting started
Getting started
Everything between an empty application and a styled Alpha control: pointing the scope at the right registry, authenticating, installing, and importing the stylesheet. The typeface is the one piece the package leaves to you.
- Point the scope at Artifact RegistryAlpha is published to the internal Google Artifact Registry, not npmjs. Add this to your
.npmrc:@growth-protocol-ai:registry=https://us-central1-npm.pkg.dev/gp-artifact-registry/npm/
- Authenticate once, globallyAuthentication uses your Google identity and a short-lived token — never a personal access token, never a service-account key, and never a committed credential:In a Yarn repository
gcloud auth login npm config set \ "//us-central1-npm.pkg.dev/gp-artifact-registry/npm/:_authToken" \ "$(gcloud auth print-access-token)"
yarn artifactregistry-logindoes the same in one step. Your identity needsroles/artifactregistry.readeron the repository, and tokens last about an hour. - Install
pnpm add @growth-protocol-ai/alpha
reactandreact-domare peers:^18.3 || ^19. - Import the stylesheet and set the modeOnce, in your root layout — then set
data-modeon<html>. It takesdarkorlight, and dark is what renders if you set nothing. Letting a reader choose is that one attribute — no provider, and nothing to re-render. It is not anchored to<html>either, so putting it on any element themes that subtree.import '@growth-protocol-ai/alpha/styles.css'; <html lang="en" data-mode={mode}>
Lato is the design font and is not shipped. Expose --font-lato however you already load fonts, or the literal fallback resolves against your own @font-face:
var(--font-lato, 'Lato'), var(--font-nwo, 'Source Sans Pro'), -apple-system, BlinkMacSystemFont, Helvetica, sans-serif