Next.js Discord

Discord Forum

Anyway to get container query to work on nextjs ?

Unanswered
Yellow croaker posted this in #help-forum
Open in Discord

1 Reply

The syntax for the container property is <container-name> / <container-type> as documented [here](https://nextjs.org/docs/app/api-reference/functions/use-router#migrating-from-nextrouter).

Also, since you're naming the container it would probably be a good idea to use it in your query (@container layout (...).