Checkout our Storybook Documentation to see the components in action and get started.
A comprehensive form library for React applications with modern data table filtering capabilities.
We've added a powerful, accessible filtering system inspired by Linear's interface:
- ποΈ Multiple Filter Types: Text, option, date, and number filters
- π URL State Synchronization: Filter state persists across page refreshes
- π Faceted Filtering: Dynamic option counts based on current filters
- β‘ Client & Server-Side: Flexible filtering strategies for any dataset size
- βΏ Accessibility: Full WCAG 2.1 AA compliance
- π¨ Modern UI: Clean, Linear-inspired design
import { DataTableFilter } from '@lambdacurry/forms/ui/data-table-filter';
import { useDataTableFilters } from '@lambdacurry/forms/ui/data-table-filter/hooks/use-data-table-filters';
import { createColumnConfigHelper } from '@lambdacurry/forms/ui/data-table-filter/core/filters';
const dtf = createColumnConfigHelper<YourDataType>();
const columnConfigs = [
dtf.text().id('title').accessor(row => row.title).displayName('Title').build(),
dtf.option().id('status').accessor(row => row.status).displayName('Status')
.options([
{ value: 'active', label: 'Active' },
{ value: 'inactive', label: 'Inactive' },
]).build(),
];
const MyTable = () => {
const [filters, setFilters] = useFilterSync();
const { columns, actions, strategy } = useDataTableFilters({
columnsConfig: columnConfigs,
filters,
onFiltersChange: setFilters,
strategy: 'client',
data: yourData,
});
return <DataTableFilter columns={columns} filters={filters} actions={actions} strategy={strategy} />;
};π View Complete Filter Documentation
- Comprehensive form field components with validation
- React Hook Form integration
- Remix integration for server-side forms
- TypeScript support with excellent IntelliSense
- Modern Linear-inspired filter interface
- Multiple filter types (text, option, date, number)
- URL state synchronization for filter persistence
- Faceted filtering with dynamic option counts
- Client-side and server-side filtering strategies
- Full accessibility support (WCAG 2.1 AA)
- Comprehensive test coverage
Step 1: Install dependencies
yarn installStep 2: Start Storybook
yarn storybookWhen you create a pull request, a preview of the Storybook documentation will be automatically deployed. You can find the link to the preview in the PR comments. This allows you to review changes to the documentation and components before merging.
Preview URLs follow this format:
https://lambda-curry.github.io/forms/pr-preview/pr-[PR_NUMBER]/
The PR preview system:
- Builds the Storybook documentation for each PR
- Deploys it to a PR-specific directory on the
gh-pagesbranch - Adds a comment to the PR with a link to the preview
- Automatically updates the preview when you push new changes to the PR
- Cleans up the preview when the PR is closed
For PR previews to work properly, you need to set up a GitHub environment:
- Go to your repository settings
- Navigate to "Environments"
- Create a new environment named
pr-preview - Configure environment protection rules as needed:
- You can require reviewers to approve deployment
- You can limit deployment to specific branches
- You can add wait timers before deployment
The main branch will continue to deploy to the github-pages environment.
If you encounter a 404 error when accessing the PR preview:
- Make sure the PR build has completed successfully by checking the GitHub Actions tab
- Verify that the repository has GitHub Pages enabled and configured to deploy from the
gh-pagesbranch - Check that the PR preview comment contains the correct URL
- Ensure the PR has been approved for deployment if environment protection rules are enabled
- Try clearing your browser cache or using an incognito window
The PR preview is deployed to the gh-pages branch in a directory structure like:
/pr-preview/pr-[PR_NUMBER]/
Releases can be published either automatically via CI/CD (using npm trusted publishers) or manually from the command line.
When you merge changes to main with version updates, the GitHub Actions workflow will automatically publish to npm using npm trusted publishers. This uses OIDC authentication and doesn't require npm tokens.
Setup required: Configure trusted publishers on npmjs.com for the @lambdacurry/forms package (see setup instructions below).
- Go to your package on npmjs.com: https://www.npmjs.com/package/@lambdacurry/forms
- Navigate to Settings β Trusted Publisher section
- Click "Select your publisher" β GitHub Actions
- Configure the following:
- Organization or user:
lambda-curry(or your GitHub username) - Repository:
forms - Workflow filename:
release.yml(must match exactly, including.ymlextension)
- Organization or user:
- Click Save
The workflow file must exist at .github/workflows/release.yml in your repository. Once configured, publishes from the main branch will use OIDC authentication automatically.
You can also publish manually from the command line when needed.
-
Ensure you're logged into npm:
npm login
You must be logged in as a user with publish permissions for the
@lambdacurryorganization. -
Verify your npm credentials:
npm whoami
-
Ensure you're on the
mainbranch and up to date:git checkout main git pull origin main
If you have changes that need to be documented in the changelog, create a changeset:
yarn changesetFollow the prompts to:
- Select which packages to include
- Choose the version bump type (patch, minor, major)
- Write a summary of the changes
This updates package versions and generates the changelog:
yarn changeset versionThis will:
- Update
packages/components/package.jsonwith the new version - Update
packages/components/CHANGELOG.mdwith the new entries - Remove the consumed changeset files
Before publishing, ensure everything builds and tests pass:
yarn build
yarn testPublish the package to npm using changesets:
yarn releaseThis command runs changeset publish, which:
- Runs
yarn build(viaprepublishOnlyhook in package.json) - Publishes
@lambdacurry/formsto npm (uses npm under the hood) - Creates git tags for the release
- Requires you to be logged into npm (
npm login)
Note: changeset publish uses npm CLI internally, so you must be authenticated with npm. The changeset system handles versioning, changelog generation, and publishing all in one workflow.
After successful publishing, commit the version changes and push:
git add .
git commit -m "chore(release): publish vX.Y.Z"
git push origin mainIf you need to publish without using changesets (e.g., for a hotfix), you can use npm directly:
# From the packages/components directory
cd packages/components
npm version patch -m "chore: bump version to %s"
cd ../..
yarn install # Update yarn.lock
yarn workspace @lambdacurry/forms build
npm publish --workspace=packages/componentsNote: This bypasses the changeset workflow, so you'll need to manually update the CHANGELOG.md if you want to document the release.
- "Not logged in" error: Run
npm loginand verify withnpm whoami - "Permission denied": Ensure your npm user has publish permissions for
@lambdacurryorganization - Build fails: Fix build errors before publishing. The
prepublishOnlyhook will prevent publishing if the build fails