Installation
Install Conditions and the adapters you need.
Core
npm install @saas-js/conditionsThe core package is framework-agnostic. It depends on @standard-schema/spec
and @tanstack/store. Pair it with Zod, Valibot, ArkType, or any other
Standard Schema library for field and
operator schemas.
npm install zodAdapters
Install only what you use. Each adapter takes @saas-js/conditions as a peer
dependency.
npm install @saas-js/conditions-react
npm install @saas-js/conditions-tanstack-table
npm install @saas-js/conditions-drizzle
npm install @saas-js/conditions-zero| Package | Peer dependencies |
|---|---|
@saas-js/conditions-react | react >= 18 |
@saas-js/conditions-tanstack-table | @tanstack/table-core >= 9 |
@saas-js/conditions-drizzle | drizzle-orm >= 0.40 |
@saas-js/conditions-zero | @rocicorp/zero >= 1 |
The React package has no styles and no component-library dependencies. Chakra
UI and shadcn examples live in the docs and the
storybook workspace,
not in the published package.
Next steps
- Basic usage — define fields and create a store
- React — bind the definition to a UI