You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Variable binding does not work inside YAML blocks or JSON props #286
::PageHero
---
links:
- label: Publier votre première mission
to: data.platform.dashboard_login_url
---
#headline
:badge{label="Associations" size="xl"}
#title
Mobilisez les citoyens à votre cause
#description
Publiez vos missions et trouvez de nouveaux bénévoles
::
::PageHero{:links='[{"label": "Publier votre première mission ","to": "data.platform.dashboard_login_url"}]'}
#headline
:badge{label="Associations" size="xl"}
#title
Mobilisez les citoyens à votre cause
#description
Publiez vos missions et trouvez de nouveaux bénévoles
::
Description
I noticed an issue when trying to use dynamic variables inside component props, both in YAML blocks and JSON inline props.
Variables are not evaluated/bound and are treated as plain text strings instead. I also tried adding : in front of the prop (e.g. :to), but it still doesn't work.
Indeed this is not implemented, and I'm not sure whether we should have it or not. This feature goes beyond Vue prop binding and creates a computed logic.
I understand your point, but for me, this feature is really essential.
In Nuxt UI, many components use complex props (like links, which takes an array of objects). In these components, needing dynamic values is a very common use case.
For example:
Environments: Changing a link URL depending on the environment (staging vs production).
User state: Changing a link URL depending on whether the user is logged in or not.
@maximepvrt@farnabaz I've put up a PR with “similar” functionality as the ask in the @nuxtjs/mdc repo here: nuxt-content/mdc#516 and am currently writing a port for it over to Comark
Activity
farnabaz commentedon Jul 23, 2026
Indeed this is not implemented, and I'm not sure whether we should have it or not. This feature goes beyond Vue prop binding and creates a computed logic.
maximepvrt commentedon Jul 23, 2026
@farnabaz Thanks for the reply!
I understand your point, but for me, this feature is really essential.
In Nuxt UI, many components use complex props (like
links, which takes an array of objects). In these components, needing dynamic values is a very common use case.For example:
adamdehaven commentedon Oct 14, 2026
@maximepvrt @farnabaz I've put up a PR with “similar” functionality as the ask in the
@nuxtjs/mdcrepo here: nuxt-content/mdc#516 and am currently writing a port for it over to Comark