Skip to content

All packages

The Portable Text ecosystem: official packages from the portabletext organization and community-maintained libraries. Packages marked with Community are maintained outside the official organization.

Serializers convert Portable Text JSON into your target output.

PackageTargetInstall
@portabletext/reactReactnpm i @portabletext/react
@portabletext/to-htmlHTML stringnpm i @portabletext/to-html
@portabletext/vueVuenpm i @portabletext/vue
@portabletext/svelteSvelte 5+npm i @portabletext/svelte
@portabletext/solidSolidJSnpm i @portabletext/solid
@portabletext/react-nativeReact Nativenpm i @portabletext/react-native
@portabletext/react-pdfReact PDFnpm i @portabletext/react-pdf
astro-portabletext CommunityAstronpm i astro-portabletext
portabletext-qwik CommunityQwiknpm i portabletext-qwik
@limitless-angular/sanity CommunityAngularnpm i @limitless-angular/sanity
PackageLanguage
dotnet-portable-textC# / .NET
portable-text-dotnet CommunityC# / .NET
sanity-linq CommunityC# / .NET
portabletext-html CommunityPython
sanity-phpPHP
flutter_sanity_portable_text CommunityDart / Flutter
flutter_portabletext CommunityDart / Flutter
ruby_portable_text CommunityRuby
portabletext CommunityGo
IntegrationPlatform
transform.PortableTextHugo (built-in)
portable-text-to-liquidShopify / Liquid
PackagePurposeInstall
@portabletext/editorHeadless, schema-driven block content editor for Reactnpm i @portabletext/editor
@portabletext/toolbarHeadless toolbar hooks for the editornpm i @portabletext/toolbar
@portabletext/schemaDefine and compile Portable Text schemas with full type safetynpm i @portabletext/schema
@portabletext/keyboard-shortcutsPlatform-aware keyboard shortcutsnpm i @portabletext/keyboard-shortcuts
PluginWhat it doesInstall
@portabletext/plugin-typographySmart quotes, em dashes, ellipsesnpm i @portabletext/plugin-typography
@portabletext/plugin-markdown-shortcutsMarkdown-style shortcuts in the editornpm i @portabletext/plugin-markdown-shortcuts
@portabletext/plugin-paste-linkPaste URLs as linksnpm i @portabletext/plugin-paste-link
@portabletext/plugin-emoji-pickerEmoji pickernpm i @portabletext/plugin-emoji-picker
@portabletext/plugin-character-pair-decoratorMatch character pairs and decorate text between themnpm i @portabletext/plugin-character-pair-decorator
@portabletext/plugin-input-ruleConfigure input rulesnpm i @portabletext/plugin-input-rule
@portabletext/plugin-one-lineRestrict editor to a single linenpm i @portabletext/plugin-one-line
@portabletext/plugin-typeahead-pickerTypeahead/autocomplete picker infrastructurenpm i @portabletext/plugin-typeahead-picker
@portabletext/plugin-sdk-valueSyncs editor value with the Sanity SDKnpm i @portabletext/plugin-sdk-value
PackageDirectionInstall
@portabletext/htmlHTML → Portable Textnpm i @portabletext/html
@portabletext/block-toolsHTML → Portable Text (Sanity wrapper)npm i @portabletext/block-tools
@portabletext/markdownPortable Text ↔ Markdownnpm i @portabletext/markdown
@portabletext/contentful-rich-text-to-portable-textContentful → Portable Textnpm i @portabletext/contentful-rich-text-to-portable-text
@emdash-cms/gutenberg-to-portable-text CommunityWordPress / Gutenberg → Portable Textnpm i @emdash-cms/gutenberg-to-portable-text
editorjs-to-portabletext CommunityEditor.js → Portable Textnpm i editorjs-to-portabletext
@aceccarello/portable-text-to-lexical CommunityPortable Text → Payload Lexical JSONnpm i @aceccarello/portable-text-to-lexical
PackagePurposeInstall
@portabletext/toolkittoPlainText(), buildMarksTree(), nestLists(), type guardsnpm i @portabletext/toolkit
@portabletext/typesTypeScript type definitions for Portable Text datanpm i @portabletext/types
@portabletext/patchesApply patches to Portable Text valuesnpm i @portabletext/patches
@portabletext-typed/types CommunityTyped generics for @portabletext/typesnpm i @portabletext-typed/types
PackagePurposeInstall
@portabletext/testTesting utilities for the Portable Text Editornpm i @portabletext/test
racejarFramework-agnostic Gherkin test drivernpm i racejar

These packages are deprecated. Use the current equivalents listed above.

Deprecated packageReplaced by
@sanity/block-content-to-react@portabletext/react
@sanity/block-content-to-html@portabletext/to-html
@sanity/block-content-to-hyperscript@portabletext/to-html
@sanity/block-content-to-markdown@portabletext/markdown
@sanity/block-tools@portabletext/block-tools
@sanity/portable-text-editor@portabletext/editor

For more packages, see the Portable Text organization on GitHub.