The Portable Text Editor gives you control of how it renders each schema type element. You need to explicitly tell it what. These choices have no impact on the Portable Text output—they only affect how the editor itself renders content.
The following props can be passed to the PortableTextEditable component:
renderAnnotation: For annotations (e.g., hyperlinks).
renderBlock: For block objects (e.g., images, embeds).
renderChild: For inline objects (e.g., custom emoji, stock symbols).
renderDecorator: For decorators (e.g., strong, italic, emphasis text).
renderStyle: For core text block types (e.g., normal, h1, h2, h3, blockquote)
All the different render functions passed to PortableTextEditable can be defined as stand-alone React components.
Most follow the same pattern of reading props and conditionally rendering elements based on schema data.
Lists are a bit unique. Portable Text has no concept of block nesting, so the solution is to use pure CSS to style them. We suggest including this example CSS or similar to manage list rendering.
Here are basic implementations of some core types:
You can apply styles, libraries like Tailwind, or use custom react components within the rendering functions.