General UI components for OpenStax projects.
Add to your project using GitHub tags:
"dependencies": {
"@openstax/ui-components": "https://github.com/openstax/ui-components#1.15.0"
}
Use a version that matches your project's requirements.
We use Git tags instead of npm publishing:
- Standard:
1.15.0
,1.15.1
- Pre-release:
1.15.3-pre1
- Feature-specific:
sentry-logger-03212025
- Update the version in
package.json
- Run
./scripts/publish.bash
Runs on PRs and main branch, handling:
- Jira ticket verification
- Linting and tests
// Import all components
import * as UI from '@openstax/ui-components';
// Or just what you need
import { Button, Modal } from '@openstax/ui-components';
yarn dev # Watch mode
yarn ladle serve # Component demos at localhost:61000
yarn test # Run tests
yarn lint # Check code rules
yarn dist # Build distribution files
To test changes before tagging:
- Push your branch
- Update the consuming project temporarily:
"@openstax/ui-components": "https://github.com/openstax/ui-components#your-branch"
- After testing, create and push a proper version tag
- Update
CHANGELOG.md
with significant changes - Coordinate breaking changes with dependent projects
- Include tests and Ladle stories for new components
- Export all components from
src/index.ts