[SalesForce] way to put a custom lightning web component inside another custom lightning web component passing parameters

I am new to lightning web components and I want to make a custom lwc and put it inside another custom lwc.

I know this is achievable via lightning with

<c:yourCustomComponent attribute1="value1" attribute2="value2"/>

But I'm not finding any clue on how to do this with web components.

Is there a way to achieve this?

Best Answer

You can check this documentation Set Properties on Child Components.

NOTE Property names in JavaScript are in camel case while HTML attribute names are in kebab case (dash-separated) to match HTML standards. In todoApp.html, the item-name attribute in markup maps to the itemName JavaScript property of c-todo-item.

Your code should be like:

<c-your-custom-component attribute1="value1" attribute2="value2" att3={trackedJavascriptProperty}></c-your-custom-component>