This project is not covered by Drupal’s security advisory policy.
Paragraph Variant Manager solves a common Drupal content editing problem: you have a single Paragraph type (like a Hero or Banner) with many fields, but depending on context you only want editors to see and fill a subset of those fields. Instead of duplicating your paragraph type into multiple variants or hiding fields with Twig tricks, this module lets you define named variants — each specifying exactly which fields are visible — and editors simply pick one from a dropdown. The form instantly adapts to show only the relevant fields.
Named, exportable variants — Variants are config entities, fully exportable via drush config:export and deployable through CI/CD pipelines. No database-only configuration.
Works with any Paragraph type — Add a variant selector field to any existing paragraph bundle without creating new bundles or changing your content model.
AJAX-powered admin UI — When creating or editing a variant, the field checkboxes update instantly when you change the paragraph bundle — no page reload needed.
Per-variant field visibility — Each variant defines exactly which fields are shown to editors. All other managed fields are hidden via JavaScript.
Required field protection — Hidden fields automatically have their HTML5 required attribute suppressed so the form can still be submitted without validation errors.
Twig variable injection — A {{ variant }} variable is automatically available in all paragraph Twig templates so theme developers can conditionally adjust front-end output.
Optional data clearing — An opt-in setting can wipe hidden field values on save to prevent stale data from old variants (off by default — data is preserved).
Per-bundle variant field override — The field that acts as the variant selector defaults to field_variant but can be overridden globally or per bundle in settings.
Drupal 10.2, 11 compatible — Uses the modern #[Hook] attribute system on Drupal 11.1+ with full backward compatibility.
Example use case: You have a single Banner paragraph type with fields for desktop image, mobile image, heading, sub-heading, and CTA. You create two variants: Home Banner (all fields visible) and Inner Banner (only desktop image and heading). Editors pick the variant first and the form shows only what they need.
After enabling the module:
Add a variant selector field to your paragraph type
Go to Structure → Paragraph types → [Your type] → Manage fields and add a List (text) field named field_variant. Add one allowed value per variant you plan to create (e.g. home_banner|Home Banner, inner_banner|Inner Banner). Place it at the top of Manage form display so editors see it first.
Create variants
Go to Administration → Structure → Paragraph variants (or use the toolbar shortcut). Click Add variant, select your paragraph bundle, give the variant a label and machine name, then check the fields that should be visible when this variant is selected. Save.
Test on a content edit form
Open any node that uses the paragraph type. The variant selector dropdown will appear. Changing it immediately hides or shows the configured fields.
Optional: configure settings
Go to Administration → Configuration → Content → Paragraph Variant Manager Settings to change the default variant field name, set per-bundle overrides, or enable the "clear hidden field values on save" option.
No content types, text formats, or theme changes are required. The module works with your existing paragraph setup.
Drupal core ^10.2 || ^11
Paragraphs ^1.17 — the module is built specifically for the Paragraphs ecosystem and requires it.
JavaScript enabled in the browser for the hide/show behaviour. The module degrades gracefully — all fields remain visible and the variant value is still saved if JS is disabled.
Install via Composer:
composer require drupal/paragraph_variant_managerdrush en paragraph_variant_manager
Paragraphs Type Permissions — Control which roles can use which paragraph types. Pairs well with Variant Manager to restrict which variants specific editors can access.
Conditional Fields — If you need more complex logic than "show/hide based on a single select", Conditional Fields can complement Variant Manager.
Paragraphs Edit — Improves the paragraph editing UX, works alongside this module.
Paragraphs Features — Adds UX improvements to the Paragraphs widget but does not provide field-level visibility control based on a variant selector.
Conditional Fields — Can show/hide fields based on other field values. More powerful but requires per-field configuration on the form display, is not Paragraphs-specific, and does not have the exportable config-entity model.
Creating multiple Paragraph bundles — The traditional approach. Works but causes content model duplication, harder to maintain, and makes cross-variant content reuse impossible.
Form Modes — Drupal core feature. Requires creating a separate form mode per variant, cannot switch dynamically per-entity-instance (only per-bundle), and requires theme/routing changes to load the right mode.
Paragraph Variant Manager is the only module that provides per-entity-instance, exportable, config-entity–based field visibility specifically designed for the Paragraphs workflow.
If this module saves you time on a project, consider:
Posting a review on the project page
Filing detailed bug reports in the issue queue
Submitting patches or merge requests for improvements
Mentoring others in the Paragraphs community about this approach
Full setup walkthrough and configuration reference: see the README.md included in the module.
Issue queue: drupal.org/project/issues/paragraph_variant_manager
Demo and video walkthrough: coming soon
Project information
- Project categories: Content display
- Created by drupgmi on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.


