The "use" attribute should also work for variants.

Created on 11 February 2023, almost 2 years ago
Updated 20 June 2023, over 1 year ago

Problem/Motivation

If the markup of a variant is too differnt from another variant it often makes sense to put the markup in own template file.
Right now it is only possible to assign one template to pattern using the "use" attribute.

card:
  label: "Card"
  use: "@molecules/card/card.twig"
  variants:
    default:
      label: Default
    horizontal:
      label: Horizontal
      use: "@molecules/card/card--horizontal.twig"

Proposed resolution

Add the possibilitly to assign a template to a variant.

Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇩🇪Germany Christian.wiedemann

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024