Using and writing plugins
Plugins work at different stages of content processing. Start with slots to change components and interactions, or use render plugins to choose which slots nodes use. Core plugins handle parsing, repairs, and streaming transformations.
For a streaming visual effect, you can pass a mapper directly through streaming.effect. It accepts the same mapper and options as plugins.mappers, without requiring a plugin pack.
Use one plugin pack
plugins accepts an IPluginItem or an array of them. A plugin pack can contain several lists: slots, renders, remarks, rehypes, repairs, and mappers.
Import the
IPluginItemtype from@fluxdown/react-base-plugins/typings.
HighlightedPlugin is an composite plugin exported by your app. It combines slot, render, and Core plugins into one feature.
Combine plugin packs
Pass plugin packs to Fluxdown in an array. At the same priority, later render plugins match first, and later slot plugins wrap earlier components through Raw:
Configure presets
List the preset you want to configure, then supply its options in config, keyed by the plugin’s key. For example, hide an image while its URL is still being generated:
This example requires
pnpm add @fluxdown/core-plugins. The default image strategy isplaceholder, which displays placeholder content.
config applies to the plugins listed in the same pack. Other presets remain in place. See Plugin matrix for built-in React Native plugins, and the Core plugin guides for parsing and mapping presets. See Configuration for the full prop.