
By Explified
A Smart Preview plugin for Strapi v4/v5 that injects a configurable preview button into the Content Manager edit view
released March 30, 2026
npm install strapi-plugin-smart-previewA production-ready plugin for Strapi v4 / v5 that injects a "Smart Preview" button directly into the Content Manager's edit view. It dynamically uses the current content type and entry ID to build a configurable preview URL, allowing content editors to easily preview their work on your frontend.
<basePreviewUrl>?type=<contentType>&id=<id> automatically.token query parameter for secure preview endpoints.npm install strapi-plugin-smart-preview
# or
yarn add strapi-plugin-smart-previewEnable the plugin in your config/plugins.js (or .ts):
module.exports = ({ env }) => ({
'smart-preview': {
enabled: true,
config: {
previewBaseUrl: env('PREVIEW_BASE_URL', 'http://localhost:3000/preview'),
previewToken: env('PREVIEW_TOKEN', null),
},
},
});| Variable | Description | Default |
|---|---|---|
PREVIEW_BASE_URL | Base URL for the preview endpoint | http://localhost:3000/preview |
PREVIEW_TOKEN | Optional token for secure previews | null |
npm run develop).The button opens a new tab with:
<previewBaseUrl>?type=<content-type-uid>&id=<entry-id>&token=<optional-token>The plugin:
register().PreviewButton React component into the Content Manager's edit view via bootstrap().| Strapi Version | Supported |
|---|---|
| v5.x | ✅ |
| v4.x | ✅ |
| v3.x | ❌ |
MIT — Made with ❤️ by Techexplified
Share your work with the community and get it listed in the Strapi ecosystem for everyone to discover and use.
Submit
