[![Netlify Status](https://api.netlify.com/api/v1/badges/6e13a49e-13a6-4a1d-843a-5cf0a1777e42/deploy-status)](https://app.netlify.com/sites/thds/deploys)

## Pit Viper

Documentation for Turquoise Health's design system, [Pit Viper](https://pitviper.turquoise.health).

Pit Viper has 2 main components:
- The Pit Viper CSS framework
- The Pit Viper Component Library (PV Components)

### Running Pit Viper Locally

**Prerequisites:** Node.js >= 24 and [pnpm](https://pnpm.io/) are required. This repo uses pnpm workspaces. Run `./scripts/check-deps.sh` to check for these; on macOS with Homebrew it can prompt to `brew install` anything missing.

1. Clone this repo.
2. Run `pnpm install` to install all necessary packages.
3. Run `pnpm run start` and you should see Pit Viper in http://localhost:8080/. Any updates will automatically update and refresh in the browser.
4. If you are using the Pit Viper component library, run `pnpm run storybook` in another terminal to serve the full component documentation (embedded within the 11ty pages), then go to http://localhost:8080/pv-components.

To develop locally (CSS or components), read the [Notion documentation](https://www.notion.so/turquoisehealth/Develop-w-Pit-Viper-Locally-f2c2ce234c934525a18172504f704080).

For information on versioning/publishing components, refer to the README [here](./.changeset/README.md)

### Applying Pit Viper (CSS)

#### Install as an npm package

```html
npm install @turquoisehealth/pit-viper
```

The package includes the following recommended files:

* `_site/assets/css/pit-viper-v3.css`
* `_site/assets/css/pit-viper-a11y-v3.css`
* `_src/assets/sprite-v2.svg`

Add `pit-viper-v3.css` in the `<head>` of a page:

```html
<link rel="stylesheet" href="[path]/pit-viper-v3.css">
```

Add the contents of `sprite-v2.svg` in the `<body>` of a page:

```html
<div hidden>[include sprite-v2.svg here]</div>
```

#### Use as a CodePen template

Use the template below to start prototyping quickly without writing CSS.

* [CodePen Template](https://codepen.io/pen?template=YzOOoYz)

### Support

* #design-system channel in Slack
* Office Hours, every Wednesday from 11am-Noon Pacific (contact [Mike Aparicio](mailto:mike.aparicio@turquoise.health) for an invite)
* [Submit an issue](https://github.com/turquoisehealth/pit-viper/issues) in this Github repo

