Skip to content

ScottyLabs/corgi

Repository files navigation

Corgi

Description

This is the repository for ScottyLabs' React component library. The live documentation and component library can be found at: https://corgi.scottylabs.org.

Usage

  1. Install @scottylabs/corgi
  2. Add @import "@scottylabs/corgi/css"; to your CSS file

Example adding Corgi and example using Corgi components.

Development

Each component lives in its own directory under lib/components (e.g. lib/components/Button). The directory name should match the component name.

  • Each component must include an index.tsx file that exports the component as a named export.
  • Each component should be re‑exported in lib/main.ts, which serves as the entrypoint for the library.

Design

Corgi components are designed to match the ScottyLabs design system, as documented in our Figma UI Kit.

Functionality

Components should be built on top of Base UI primitives whenever possible. For example, a Toggle component should wrap and extend the Base UI Toggle instead of re-implementing its functionality.

Styling

Each component should be styled in one of the following ways:

  1. CVA (Preferred) Use CVA with Tailwind.

  2. CSS Modules If the component requires complex CSS or animations, include an index.module.css file in the same directory.

Stories

Storybook is used to develop and showcase components in isolation.

  • Create corresponding stories for each component in src/stories (e.g. src/stories/Button.stories.ts).

  • Run Storybook locally with: bun run storybook.

Deployment

Draft a new release and GitHub workflow will automatically publish it to NPM registry.

About

ScottyLabs component library

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE-2.0
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Contributors 6