Slot plugins
Slot plugins render slots. Content such as code, links, and headings is already prepared; you decide which components and interactions readers see. Start here for most interface changes.
Declare and use a plugin
This example hides the code toolbar while keeping the default highlighting and code styles:
key identifies the plugin, type selects the slot, and Component provides its component. Add the plugin class to slots; Fluxdown manages its creation and cleanup.
Import base classes and prop types from
@fluxdown/react-native-plugins/base. Install the extension package withpnpm add @fluxdown/react-native-pluginsfirst.
Keep the defaults
Raw is the component supplied by the previous plugin. Call it to keep the existing highlighting, layout, or link behavior, then adjust the props you want to change.
Several plugins can target the same slot. At the same priority, later plugins wrap earlier components through Raw. To replace a slot entirely, return your own JSX.
Rawcan benull; check it before rendering.
Choose a slot
Each slot has a corresponding prop type, such as LinkProps or HeadingProps.
To change which slot a HAST node uses, continue with Render plugins.
Code controls
The native toolbar displays the language by default. Add a copy action through the CodeHeader slot using your app's clipboard library, such as Expo Clipboard. The app can keep its own permission handling, feedback, and sharing behavior.