Render plugins
Render plugins turn HAST nodes into slots. They choose which nodes use each slot and what content to pass along; slot plugins still provide the components.
Declare and use a plugin
This example sends ordinary paragraphs starting with “Note:” to the blockquote slot, leaving other paragraphs unchanged:
match selects nodes, and render passes their content to a slot. renderChildren renders child nodes; current, parents, and render preserve the context the slot needs.
Lower priority values match first. Here, -1 lets note paragraphs match before the default paragraph plugin. Presets continue to handle unmatched nodes.
This example requires
pnpm add @fluxdown/react-presets.
For component, style, or interaction changes, use a slot plugin. To change HAST content before rendering, use a rehype plugin.
Built-in plugins
Fluxdown includes these plugins by default; no additional setup is needed.
These plugins are included in PRESET_RENDER_PLUGINS and exported from @fluxdown/react-presets/render.