use template for custom styling of multiple subfield multivalue form element widget drupal 10

Reference

https://www.drupal.org/docs/theming-drupal/twig-in-drupal/create-custom-twig-templates-for-custom-module

https://drupal.stackexchange.com/questions/166672/how-custom-a-form-with-twig

[Tips & Tricks] Drupal 10: How to render any form in a Twig Template

That blog actually demonstrated the secret, which is to use ‘render element’ not ‘variables’ in the theme hook.

It’s always been that way, it seems: Drupal8: Render form in a Twig Template | Drupal.org

Maybe would have been helpful, if we weren’t trying to do an element’s widget (not a whole form) and have our own module and so justifying a new template: Themable forms | Drupal.org

https://api.drupal.org/api/drupal/core%21modules%21system%21templates%21form-element.html.twig/

Found the issue and patcht to ad documentaion before i found the documentation… https://www.drupal.org/files/doc-hook_theme-1021568-24.patch

https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21theme.api.php/function/hook_theme/10

https://www.drupal.org/docs/drupal-apis/render-api/render-elements/what-are-render-elements

https://www.drupal.org/forum/support/module-development-and-code-questions/2012-07-09/the-difference-between-using-reader

Maybe report back at: https://drupal.stackexchange.com/questions/267999/how-to-get-a-variable-from-fieldwidget-in-the-same-modules-template

or: https://drupal.stackexchange.com/questions/270010/changing-twig-template-of-form-items-through-the-theme