config.xml how to use a sw-label component or other components

Hi,

I want to use some components (https://component-library.shopware.com/components/sw-label/) in the backend.

But I don’t know it this is possible if you don’t can’t set the value (or how to fill a slot).

For example I want to use the sw-label, to add some extra visible description text inside a card section (not hidden using a helpText).
I can set all the variables like variant, but not the: „lorem ipsum dolor sit amet“ text.

    Lorem ipsum dolor sit amet

custom/plugins/x/src/Resources/config/config.xml

    X
    
      testLabel
      danger
      lorem ipsum dolor sit amet don't work
      lorem ipsum dolor sit amet don't work
      lorem ipsum dolor sit amet don't work
      lorem ipsum dolor sit amet don't work

What I can do is create my own custom-label component and use that, but there are many other components that needs a value to work.

When I open this file: vendor/shopware/platform/src/Administration/Resources/app/administration/src/app/component/base/sw-label/sw-label.html.twig

{% block sw_label %}
    
        {% block sw_label_text_holder %}
            
                {% block sw_label_slot_default %}{% endblock %}
            
        {% endblock %}

        ...
    
{% endblock %}

You can see a slot is used for the value.
But I don’t know how to use that, using config.xml

1 „Gefällt mir“

@mvb‍  I’m struggling with the same problem. Did you find a sollution? 

Did you found a solution yet?