Blackwork
Scroll to top

Migrate from 0.11 to 0.12

Upgrade an existing Blackwork 0.11 app to 0.12.

Migrate from 0.11 to 0.12

This page is for apps using Blackwork 0.11. New projects can skip it and start from Getting Started.

Upgrade Blackwork and Tailwind CSS first:

Bash
pnpm add blackwork@^0.12 tailwindcss@^4

If your app uses blackwork/form, also install TanStack Form:

Bash
pnpm add @tanstack/react-form

Composition

Triggers such as DialogTrigger and SheetTrigger still accept asChild. Pass a real <button> or Button as the child. Do not wrap the trigger in a non-button element just for styling.

Button still supports loading. SheetContent still supports closeButtonVisible.

Forms

blackwork/form is built on TanStack Form.

  1. Install @tanstack/react-form.
  2. Remove react-hook-form if you only used it through Blackwork.
  3. Use useAppForm, Form, and FieldGroup as shown in Form.

Field layout (Field, FieldLabel, FieldGroup) can still be used without any form library.

Icons

The blackwork/icons subpath is removed. Import generic icons from lucide-react. See Icons for the name mapping.

Styles

Blackwork 0.12 requires Tailwind CSS v4. Remove blackwork/tailwind-config and the legacy Tailwind plugin setup, then import:

CSS
@import 'tailwindcss';
@import 'blackwork/tailwind.css';