Installation & quick start


To install and save to your project's package.json dependencies, run:

// with npm
npm install @royalnavy/css-framework @royalnavy/react-component-library

// ...or with yarn
yarn add @royalnavy/css-framework @royalnavy/react-component-library

Note: As of 2.16.0 the styled-components package is now a required peerDependency.

Quick start

Here's a quick example of an application to get you started:

import React from 'react'
import ReactDOM from 'react-dom'
import '@royalnavy/css-framework/dist/styles.css'
import '@royalnavy/fonts'
import { Button } from '@royalnavy/react-component-library'

function App() {
  return (
    <Button variant="primary">
      Hello, World!

ReactDOM.render(<App />, document.querySelector('#app'))