Drupal is a registered trademark of Dries Buytaert
Release: Leaflet 10.4.11 Minor update available for module leaflet (10.4.11). Release: Session Inspector 1.0.8 Minor update available for module session_inspector (1.0.8). Release: Migrate QA 2.0.4 Minor update available for module migrate_qa (2.0.4). Release: CKEditor Description List 3.0.0 Major update available for module ckeditor_descriptionlist (3.0.0). Release: FlowDrop 2.4.0 Minor update available for module flowdrop (2.4.0). Release: JWT Token Refresh 1.0.4 Minor update available for module jwt_token_refresh (1.0.4). Release: ConReg 1.0.0-beta1 First beta version released for module conreg (1.0.0-beta1). Release: AI Image Studio 1.0.0-beta8 New beta version released for module ai_image_studio (1.0.0-beta8). Usage Milestone: Role Theme Switcher Module role_theme_switcher crossed 1,000 active installs. Module Revived: Decoupled Router 2.0.7 Module decoupled_router updated after 11 months of inactivity (2.0.7).

SDC Extras

1 sites No security coverage
View on drupal.org

SDC Extras enhances the Drupal Canvas editing experience for Single Directory Components (SDCs). It allows you to control how component props appear in the Canvas UI directly within your component definition files, eliminating the need for JavaScript or custom form modifications. This provides granular control over prop visibility and behavior, such as hiding props from editors or conditionally displaying them based on other prop values.

SDC Extras adds declarative directives to your Single Directory Component (SDC) definitions that control how each prop is presented in the Drupal Canvas editing UI, with no JavaScript and no per-component form alters.

Canvas automatically builds an editing form from a component's prop schema. SDC Extras lets you refine that form directly in your *.component.yml file by adding custom x-* keys to individual props:

  • x-no-ui hides a prop from the Canvas UI while keeping its stored value and default, so the value still renders in your template. Ideal for developer-controlled or derived props that authors shouldn't edit.
  • x-visible-when shows a prop only when another prop has a given value, e.g. reveal "CTA label" and "CTA URL" only when a "Show call to action" toggle is on. Built on Drupal's Form API #states.

Because these keys live on the prop schema (which SDC validates against the full JSON Schema meta-schema, permitting custom x-* keywords), they require no patches and follow the same convention Canvas core already uses for keys like x-translation-context and x-formatting-context.

Example

props:
  type: object
  properties:
    internal_ref:
      type: string
      x-no-ui: true
    show_cta:
      type: boolean
      title: 'Show call to action'
    cta_label:
      type: string
      title: 'CTA label'
      x-visible-when: show_cta

Requirements: Drupal 11.2+ and the Canvas module.

Activity

Tracked releases
1
Tracked since
Jul 2026
Latest release
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.0 Stable Jul 9, 2026