Skip to main content
Give us your valuable feedback

It will help us understand how we can serve you better

Give feedback

Development

Installation

Guide for installing Legion to your development

banner-Installation

Prequisites

Already have at least these below:

  • Nodejs v16 or above, if you are using multiple versions of node, we recommend using nvm/volta to manage its version
  • Node Package Manager v8 or above
  • Yarn v1.22.19 or above

Installation

Proxy and Authentication

Follow the step here in order to create your authorization token needed.

We will provide you with the API url needed to provide the tokens in your project according to your own DTP/Tribe designer.

After that, you can try to install the package.

Install the package

With either one of your package manager.

# npm
npm i @legion-crossplatform/ui
# yarn
yarn add @legion-crossplatform/ui

After that, you can set up your provider.

Setup Provider

An example in App.jsx (react native) used by Tribe :

import {
LegionProvider,
createTokens,
defaultConfigParams,
defaultTokenParams
} from '@legion-crossplatform/ui';
import ThemeTokens from './src/utility/theme/pjs';
function App() {

After that, you can use the components in your project.

Using the components

An example of the component used in your project.

import { Button } from "@legion-crossplatform/ui";
<Button variant="softPrimary">Button</Button>

For lists of components available to use, you can check the components page.