Installation

Neighborhood is a collection of reusable components that are available in two Node packages. The packages are private and you will need to token added to your project’s .npmrc to be able to install either package successfully. Contact IT Digital for the NBHD token.

Package Install Token

To add Neighborhood to your project you will need to have the NBHD Token added to .npmrc of the project.

If you do not have .npmrc file file on your project you will need to create one. Create a new file named .npmrc in the root of your project.

Once you have .npmrc you will need to add token reference for @fbin-web. Open .npmrc and add the following snippet.

@fbin-web:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=[NBHD_TOKEN]

The [NBHD_TOKEN] is a placeholder and would need to be replaced with the actual token. Contact IT Digital for the NBHD token and replace [NBHD_TOKEN] in the snippet above with the token that is provided.

Neighborhood Core Web Components

To add Neighborhood Core Web Components and Neighborhood Core Styles to your project enter the following npm command.

npm install @fbin-web/neighborhood-core

Importing a Component

import { NbhdText } from '@fbin-web/neighborhood-core';
<nbhd-text> Neighborhood Text Component </nbhd-text>

Neighborhood React

To add Neighborhood React components to a project you will need to have the neighborhood-core and neighborhood-react packages installed.

npm install @fbin-web/neighborhood-react

Importing a React Component

import { NbhdText } from '@fbin-web/neighborhood-react';
<NbhdText>Neighborhood Text Component</NbhdText>