@shipfox/react-ui
v0.32.2
Published
The Shipfox Design System is the core of the [Shipfox](https://www.shipfox.io/) UI grammar. It contains all the React components which are the building blocks of our front-end projects.
Keywords
Readme
Shipfox Design System
The Shipfox Design System is the core of the Shipfox UI grammar. It contains all the React components which are the building blocks of our front-end projects.
Installation
Installation
pnpm add @shipfox/react-ui
# or
yarn add @shipfox/react-ui
# or
npm install @shipfox/react-uiCSS Styles
This package includes a pre-built, minified CSS bundle with all Tailwind CSS styles and design tokens. Import it in your application:
import "@shipfox/react-ui/dist/styles.css"Or in your HTML:
<link rel="stylesheet" href="node_modules/@shipfox/react-ui/dist/styles.css" />The CSS bundle is self-contained and includes all design tokens, so you don't need to configure Tailwind CSS in your consuming project.
Storybook
The storybook is publicly accessible online.
You can also launch it locally by running pnpm storybook from within this package's directory.
Visual Testing with Argos
This library uses Argos for automated visual regression testing. Argos captures screenshots of all Storybook stories and compares them across pull requests to detect unintended visual changes.
How it works
- On every pull request, GitHub Actions builds Storybook and uploads screenshots to Argos
- Argos compares the screenshots with the baseline from the main branch
- If visual differences are detected, they are highlighted in the Argos dashboard
- Reviewers can approve or reject changes directly from the PR
Running Argos locally
To upload screenshots to Argos from your local machine:
# Build Storybook
pnpm storybook:build
# Upload to Argos (requires ARGOS_TOKEN environment variable)
pnpm argosConfiguration
Argos configuration is located in argos.config.ts. You can customize:
- Screenshot capture settings
- Ignored patterns
- Comparison threshold
- Reference branch
Setting up Argos
- Create an account on Argos
- Connect your GitHub repository
- Add the
ARGOS_TOKENsecret to your GitHub repository settings - Argos will automatically run on all pull requests
