{"id":1662,"date":"2026-09-21T13:00:00","date_gmt":"2026-09-21T07:30:00","guid":{"rendered":"https:\/\/swapnilzambare.com\/blog\/lwc-parent-to-child-api\/"},"modified":"2026-11-15T11:32:52","modified_gmt":"2026-11-15T06:02:52","slug":"lwc-parent-to-child-api","status":"publish","type":"post","link":"https:\/\/swapnilzambare.com\/blog\/lwc-parent-to-child-api\/","title":{"rendered":"LWC Parent to Child Communication with @api Properties and Methods"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">LWC Parent to Child communication is how a container component sends data and commands down to the smaller components inside it. The parent passes values through public properties marked with @api, and it can call public methods on the child. This is the first and most common way components work together.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this post, you will learn @api properties, setters that react to new values, public methods, lwc:ref, and the naming rules between JavaScript and markup. It builds on <a href=\"https:\/\/swapnilzambare.com\/blog\/lwc-loops-for-each-iterator\/\">LWC loops<\/a>, <a href=\"https:\/\/swapnilzambare.com\/blog\/lwc-data-binding-getters-conditional-rendering\/\">LWC data binding<\/a> and <a href=\"https:\/\/swapnilzambare.com\/blog\/apex-access-modifiers\/\">Apex access modifiers<\/a>, because @api is the LWC version of making something public.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is LWC Parent to Child Communication?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">LWC Parent to Child communication means a parent component places a child in its template and passes it data through attributes, such as <code>&lt;c-course-card course={course}&gt;<\/code>. The child declares that property with @api, which makes it public. The parent can also call a child method marked @api, for example to reset or highlight it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Think of a school principal and class teachers. The principal hands each teacher a timetable, and the teacher uses it but does not rewrite it. When needed, the principal also gives a direct instruction, such as &#8220;start the fire drill&#8221;. Timetables are @api properties, and instructions are @api methods.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why LWC Parent to Child Matters<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Breaking a page into small parts only works if the parts can share data. Here is why LWC Parent to Child communication matters at Bright Path Tutors.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First, a course catalog passes each course to a reusable course card.<\/li>\n\n<li>Also, the same card works on the catalog, the home page and a record page.<\/li>\n\n<li>Next, the parent may ask every card to clear its selection.<\/li>\n\n<li>Cards stay simple, because they only display what they receive.<\/li>\n\n<li>Finally, small components are easier to test and reuse.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">So LWC Parent to Child communication with @api is the foundation of reusable components.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How LWC Parent to Child Works<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">LWC Parent to Child communication follows a simple path. First, the child declares a public property with @api, such as <code>@api course<\/code>. Next, the parent renders the child and sets the attribute, such as course={course}. Then LWC passes the value down when the child is created. After that, whenever the parent changes its value, the child re-renders with the new data. Finally, the parent can get a reference to the child and call any @api method on it.<\/p>\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/lwc-parent-to-child-api-diagram-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/lwc-parent-to-child-api-diagram-1-1024x640.png\" alt=\"LWC Parent to Child diagram showing declare, set attribute, pass down, re-render and call method\" class=\"wp-image-1660\" srcset=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/lwc-parent-to-child-api-diagram-1-1024x640.png 1024w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/lwc-parent-to-child-api-diagram-1-300x188.png 300w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/lwc-parent-to-child-api-diagram-1-768x480.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">How data and commands flow from parent to child.<\/figcaption><\/figure>\n\n\n<h3 class=\"wp-block-heading\">@api Properties<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">An @api property is public, so a parent can set it. In JavaScript, use camelCase, such as courseName. In markup, use kebab case, such as course-name.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Read-Only in the Child<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The child should treat @api values as read-only. If it needs to change one, it copies the value into a private field, or asks the parent to change it with an event.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Setters for @api Properties<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A getter and setter pair marked @api lets the child react every time the parent sends a new value, for example to format or validate it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">@api Methods<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A public method marked @api lets the parent tell the child to do something, such as highlight() or reset().<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">lwc:ref<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Add lwc:ref=&#8221;card&#8221; on the child, then use this.refs.card in the parent to call its methods. It is simpler than querySelector.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Naming Rules at a Glance<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The table below shows how names change between the child&#8217;s JavaScript and the parent&#8217;s markup.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>In the child JavaScript<\/th><th>In the parent markup<\/th><\/tr><\/thead><tbody><tr><td>@api course<\/td><td>course={course}<\/td><\/tr><tr><td>@api courseName<\/td><td>course-name={name}<\/td><\/tr><tr><td>@api isOnline<\/td><td>is-online={online}<\/td><\/tr><tr><td>@api highlight()<\/td><td>this.refs.card.highlight()<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">@api Property vs @api Method<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The table below compares the two ways a parent talks to a child.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Feature<\/th><th>@api property<\/th><th>@api method<\/th><\/tr><\/thead><tbody><tr><td>Direction<\/td><td>Parent sends data<\/td><td>Parent sends a command<\/td><\/tr><tr><td>Set in<\/td><td>Markup attributes<\/td><td>JavaScript call<\/td><\/tr><tr><td>Runs when<\/td><td>Value changes<\/td><td>Parent calls it<\/td><\/tr><tr><td>Typical use<\/td><td>Display data<\/td><td>Reset, focus, highlight<\/td><\/tr><tr><td>Example<\/td><td>course={course}<\/td><td>this.refs.card.reset()<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When to use which is simple. Use @api properties for data the child displays. Use @api methods for one-off actions the parent triggers.<\/p>\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/lwc-parent-to-child-api-diagram-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/lwc-parent-to-child-api-diagram-2-1024x640.png\" alt=\"LWC Parent to Child diagram comparing @api properties and @api methods\" class=\"wp-image-1661\" srcset=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/lwc-parent-to-child-api-diagram-2-1024x640.png 1024w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/lwc-parent-to-child-api-diagram-2-300x188.png 300w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/lwc-parent-to-child-api-diagram-2-768x480.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">@api property vs @api method.<\/figcaption><\/figure>\n\n\n<h2 class=\"wp-block-heading\">A Real LWC Parent to Child Example<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s build LWC Parent to Child communication at Bright Path Tutors. A courseCatalog parent loops over courses and renders a courseCard child for each one. A button in the parent highlights the cheapest course.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: The Child Component<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>import { LightningElement, api } from 'lwc';\n\nexport default class CourseCard extends LightningElement {\n    @api course;\n    isHighlighted = false;\n    _discount = 0;\n\n    @api\n    get discount() {\n        return this._discount;\n    }\n    set discount(value) {\n        this._discount = Number(value) || 0;   \/\/ keep a clean number\n    }\n\n    get finalFee() {\n        return this.course.Fee__c - (this.course.Fee__c * this._discount \/ 100);\n    }\n\n    get cardClass() {\n        return this.isHighlighted ? 'slds-box slds-theme_success' : 'slds-box';\n    }\n\n    @api\n    highlight() {\n        this.isHighlighted = true;\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The child receives course and discount from its parent. The setter turns any discount value into a safe number. Finally, highlight is a public method the parent can call.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: The Child Template<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;template&gt;\n    &lt;div class={cardClass}&gt;\n        &lt;p&gt;&lt;strong&gt;{course.Name}&lt;\/strong&gt;&lt;\/p&gt;\n        &lt;p&gt;Fee after discount: {finalFee}&lt;\/p&gt;\n    &lt;\/div&gt;\n&lt;\/template&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The template shows the course name and the calculated fee. Then cardClass switches the box colour when the card is highlighted.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: The Parent Component<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!-- courseCatalog.html --&gt;\n&lt;template&gt;\n    &lt;lightning-button label=\"Highlight cheapest\" onclick={handleHighlight}&gt;&lt;\/lightning-button&gt;\n    &lt;template for:each={courses} for:item=\"c\"&gt;\n        &lt;c-course-card key={c.Id} course={c} discount=\"10\"&gt;&lt;\/c-course-card&gt;\n    &lt;\/template&gt;\n&lt;\/template&gt;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ courseCatalog.js\nimport { LightningElement } from 'lwc';\n\nexport default class CourseCatalog extends LightningElement {\n    courses = [\n        { Id: 'a01A', Name: 'Apex Basics', Fee__c: 5000 },\n        { Id: 'a01B', Name: 'SOQL Basics', Fee__c: 3000 }\n    ];\n\n    handleHighlight() {\n        const cheapest = [...this.courses].sort((a, b) =&gt; a.Fee__c - b.Fee__c)[0];\n        const cards = this.template.querySelectorAll('c-course-card');\n        cards.forEach(card =&gt; {\n            if (card.course.Id === cheapest.Id) { card.highlight(); }\n        });\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The parent passes each course and a 10% discount to a card. lwc:ref cannot be dynamic inside a loop, so for lists we use querySelectorAll. Then the handler finds the cheapest course and calls highlight on its card.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: See the Result<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here is what the catalog shows after clicking the button.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[ Apex Basics | Fee after discount: 4500 ]\n[ SOQL Basics | Fee after discount: 2700 ]   &lt;- green highlighted box<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The parent controlled the data and the action, while each card stayed simple.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">LWC Parent to Child with lwc:ref<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For a single child outside a loop, write <code>&lt;c-course-card lwc:ref=\"featured\"&gt;<\/code> and call <code>this.refs.featured.highlight()<\/code>. However, lwc:ref values must be static strings, so they do not work for children rendered in a loop.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common Mistakes with LWC Parent to Child<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Changing an @api property inside the child.<\/li>\n\n<li>Using camelCase attribute names in markup instead of kebab case.<\/li>\n\n<li>Calling a child method before the child has rendered.<\/li>\n\n<li>Expecting a boolean attribute to default to true.<\/li>\n\n<li>Passing huge objects when the child needs only two fields.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices for LWC Parent to Child<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Treat @api values as read-only in the child.<\/li>\n\n<li>Use setters to clean or validate incoming values.<\/li>\n\n<li>Keep @api methods few and clearly named.<\/li>\n\n<li>Use lwc:ref for single children and querySelector for loops.<\/li>\n\n<li>Pass only the data the child needs.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Practice Task<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Add an @api reset() method to courseCard that removes the highlight, and a Reset all button in the parent that calls it on every card. Hint: reuse querySelectorAll and set isHighlighted to false.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Most Asked Interview Questions on LWC Parent to Child<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Component communication is a core interview topic. Here are the 21 questions asked most about LWC Parent to Child communication.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Basic Questions on LWC Parent to Child<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q1: How does a parent pass data to a child in LWC?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Through an attribute on the child tag, which matches an @api property in the child.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q2: What does @api do?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It makes a property or method public, so a parent can use it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q3: How is courseName written in markup?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As course-name, because markup uses kebab case.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q4: Can a child change an @api property?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It should not, so copy the value into a private field or ask the parent with an event.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q5: How does a parent call a child method?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It gets a reference with lwc:ref or querySelector and calls the @api method.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q6: What is lwc:ref?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A directive that gives the parent a direct reference through this.refs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q7: Can @api be used on getters and setters?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Yes, so the child can react whenever the parent sends a new value.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Code and Scenario Questions on LWC Parent to Child<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q8: Why use a setter on an @api property?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Because it runs every time the value changes, so you can clean or validate it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q9: Can lwc:ref be used inside a loop?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No, because ref names must be static, so use querySelectorAll for lists.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q10: How do you pass a number instead of a string?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Bind it from a JavaScript property, or convert it in a setter, because literal attributes are strings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q11: When is it safe to call a child method?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After the child has rendered, such as in a click handler or renderedCallback.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q12: How do boolean @api properties behave?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">They default to false, and the parent sets them to true by adding the attribute.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q13: What happens if the parent changes the passed object?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The child re-renders with the new object, because the reference changed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q14: How do you pass a list to a child?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Bind the array to an @api property, such as courses={courses}.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Advanced Questions on LWC Parent to Child<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q15: Why are @api values read-only for the child?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Because the parent owns the data, so one-way flow keeps state predictable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q16: Are objects passed by reference?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">They are passed as read-only proxies, so the child cannot change them directly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q17: How many @api methods should a component have?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Few, because a large public API is harder to maintain.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q18: Can a parent read a child&#8217;s private field?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No, so expose it with an @api getter if the parent really needs it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q19: How do @api properties work in App Builder?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Properties listed in targetConfigs become editable fields for admins.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q20: How do you design a reusable child?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Give it a small set of @api properties, sensible defaults and no hard-coded data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q21: How does a child send data back up?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It dispatches a custom event, which the next post covers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Official Resources<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/developer.salesforce.com\/docs\/platform\/lwc\/guide\/reactivity-public.html\" target=\"_blank\" rel=\"noopener noreferrer\">Public Properties (LWC Developer Guide)<\/a><\/li>\n\n<li><a href=\"https:\/\/developer.salesforce.com\/docs\/platform\/lwc\/guide\/reference-directives.html\" target=\"_blank\" rel=\"noopener noreferrer\">Reference Elements with lwc:ref (LWC Developer Guide)<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Quick Recap<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>LWC Parent to Child communication uses @api properties and methods.<\/li>\n\n<li>Markup attributes use kebab case for camelCase properties.<\/li>\n\n<li>Children treat @api values as read-only.<\/li>\n\n<li>Setters let a child react to every new value.<\/li>\n\n<li>Use lwc:ref for single children and querySelector for lists.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">What&#8217;s Next?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Children also need to talk back. Next, read our guide to <a href=\"https:\/\/swapnilzambare.com\/blog\/lwc-custom-events-child-to-parent\/\">LWC custom events for child to parent communication<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>LWC Parent to Child communication is how a container component sends data and commands down to the smaller components inside it. The parent passes&hellip;<\/p>\n","protected":false},"author":1,"featured_media":1659,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_swapz_level":"","_swapz_series_part":0,"_swapz_hide_toc":false,"_swapz_hide_featured":false,"_swapz_description":"","footnotes":""},"categories":[245,8,96],"tags":[81,26,113],"swapz_series":[],"class_list":["post-1662","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-lightning-web-components","category-salesforce","category-salesforce-developer","tag-integration","tag-intermediate","tag-lwc"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>LWC Parent to Child Communication with @api<\/title>\n<meta name=\"description\" content=\"LWC Parent to Child communication explained simply: @api properties, setters, public methods, lwc:ref, naming rules, read-only data and 21 interview Q&amp;A.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/swapnilzambare.com\/blog\/lwc-parent-to-child-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"LWC Parent to Child Communication with @api\" \/>\n<meta property=\"og:description\" content=\"LWC Parent to Child communication explained simply: @api properties, setters, public methods, lwc:ref, naming rules, read-only data and 21 interview Q&amp;A.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/swapnilzambare.com\/blog\/lwc-parent-to-child-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Swapnil Zambare - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-21T07:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-15T06:02:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/lwc-parent-to-child-api-featured.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t<meta property=\"og:image:height\" content=\"1260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Swapnil Zambare\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Swapnil Zambare\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/lwc-parent-to-child-api\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/lwc-parent-to-child-api\\\/\"},\"author\":{\"name\":\"Swapnil Zambare\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/person\\\/10b09224c8bcc562716e86789427592a\"},\"headline\":\"LWC Parent to Child Communication with @api Properties and Methods\",\"datePublished\":\"2026-09-21T07:30:00+00:00\",\"dateModified\":\"2026-11-15T06:02:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/lwc-parent-to-child-api\\\/\"},\"wordCount\":1607,\"publisher\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/lwc-parent-to-child-api\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/lwc-parent-to-child-api-featured.png\",\"keywords\":[\"Integration\",\"Intermediate\",\"LWC\"],\"articleSection\":[\"Lightning Web Components\",\"Salesforce\",\"Salesforce Developer\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/lwc-parent-to-child-api\\\/\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/lwc-parent-to-child-api\\\/\",\"name\":\"LWC Parent to Child Communication with @api\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/lwc-parent-to-child-api\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/lwc-parent-to-child-api\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/lwc-parent-to-child-api-featured.png\",\"datePublished\":\"2026-09-21T07:30:00+00:00\",\"dateModified\":\"2026-11-15T06:02:52+00:00\",\"description\":\"LWC Parent to Child communication explained simply: @api properties, setters, public methods, lwc:ref, naming rules, read-only data and 21 interview Q&A.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/lwc-parent-to-child-api\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/lwc-parent-to-child-api\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/lwc-parent-to-child-api\\\/#primaryimage\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/lwc-parent-to-child-api-featured.png\",\"contentUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/lwc-parent-to-child-api-featured.png\",\"width\":2400,\"height\":1260,\"caption\":\"LWC Parent to Child featured image: title card with an LWC code example\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/lwc-parent-to-child-api\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"LWC Parent to Child Communication with @api Properties and Methods\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\",\"name\":\"Swapnil Zambare - Blog\",\"description\":\"Salesforce &amp; Tech Guides\",\"publisher\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\",\"name\":\"Swapnil Zambare - Blog\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/site-icon-512.png\",\"contentUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/site-icon-512.png\",\"width\":512,\"height\":512,\"caption\":\"Swapnil Zambare - Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/theSwapnilZambare\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/person\\\/10b09224c8bcc562716e86789427592a\",\"name\":\"Swapnil Zambare\",\"sameAs\":[\"https:\\\/\\\/swapnilzambare.com\\\/blog\"],\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/author\\\/swapnil-zambare\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"LWC Parent to Child Communication with @api","description":"LWC Parent to Child communication explained simply: @api properties, setters, public methods, lwc:ref, naming rules, read-only data and 21 interview Q&A.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/swapnilzambare.com\/blog\/lwc-parent-to-child-api\/","og_locale":"en_US","og_type":"article","og_title":"LWC Parent to Child Communication with @api","og_description":"LWC Parent to Child communication explained simply: @api properties, setters, public methods, lwc:ref, naming rules, read-only data and 21 interview Q&A.","og_url":"https:\/\/swapnilzambare.com\/blog\/lwc-parent-to-child-api\/","og_site_name":"Swapnil Zambare - Blog","article_published_time":"2026-09-21T07:30:00+00:00","article_modified_time":"2026-11-15T06:02:52+00:00","og_image":[{"width":2400,"height":1260,"url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/lwc-parent-to-child-api-featured.png","type":"image\/png"}],"author":"Swapnil Zambare","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Swapnil Zambare","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/swapnilzambare.com\/blog\/lwc-parent-to-child-api\/#article","isPartOf":{"@id":"https:\/\/swapnilzambare.com\/blog\/lwc-parent-to-child-api\/"},"author":{"name":"Swapnil Zambare","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/10b09224c8bcc562716e86789427592a"},"headline":"LWC Parent to Child Communication with @api Properties and Methods","datePublished":"2026-09-21T07:30:00+00:00","dateModified":"2026-11-15T06:02:52+00:00","mainEntityOfPage":{"@id":"https:\/\/swapnilzambare.com\/blog\/lwc-parent-to-child-api\/"},"wordCount":1607,"publisher":{"@id":"https:\/\/swapnilzambare.com\/blog\/#organization"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/lwc-parent-to-child-api\/#primaryimage"},"thumbnailUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/lwc-parent-to-child-api-featured.png","keywords":["Integration","Intermediate","LWC"],"articleSection":["Lightning Web Components","Salesforce","Salesforce Developer"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/swapnilzambare.com\/blog\/lwc-parent-to-child-api\/","url":"https:\/\/swapnilzambare.com\/blog\/lwc-parent-to-child-api\/","name":"LWC Parent to Child Communication with @api","isPartOf":{"@id":"https:\/\/swapnilzambare.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/swapnilzambare.com\/blog\/lwc-parent-to-child-api\/#primaryimage"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/lwc-parent-to-child-api\/#primaryimage"},"thumbnailUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/lwc-parent-to-child-api-featured.png","datePublished":"2026-09-21T07:30:00+00:00","dateModified":"2026-11-15T06:02:52+00:00","description":"LWC Parent to Child communication explained simply: @api properties, setters, public methods, lwc:ref, naming rules, read-only data and 21 interview Q&A.","breadcrumb":{"@id":"https:\/\/swapnilzambare.com\/blog\/lwc-parent-to-child-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/swapnilzambare.com\/blog\/lwc-parent-to-child-api\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/lwc-parent-to-child-api\/#primaryimage","url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/lwc-parent-to-child-api-featured.png","contentUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/lwc-parent-to-child-api-featured.png","width":2400,"height":1260,"caption":"LWC Parent to Child featured image: title card with an LWC code example"},{"@type":"BreadcrumbList","@id":"https:\/\/swapnilzambare.com\/blog\/lwc-parent-to-child-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/swapnilzambare.com\/blog\/"},{"@type":"ListItem","position":2,"name":"LWC Parent to Child Communication with @api Properties and Methods"}]},{"@type":"WebSite","@id":"https:\/\/swapnilzambare.com\/blog\/#website","url":"https:\/\/swapnilzambare.com\/blog\/","name":"Swapnil Zambare - Blog","description":"Salesforce &amp; Tech Guides","publisher":{"@id":"https:\/\/swapnilzambare.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/swapnilzambare.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/swapnilzambare.com\/blog\/#organization","name":"Swapnil Zambare - Blog","url":"https:\/\/swapnilzambare.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/09\/site-icon-512.png","contentUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/09\/site-icon-512.png","width":512,"height":512,"caption":"Swapnil Zambare - Blog"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/in\/theSwapnilZambare"]},{"@type":"Person","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/10b09224c8bcc562716e86789427592a","name":"Swapnil Zambare","sameAs":["https:\/\/swapnilzambare.com\/blog"],"url":"https:\/\/swapnilzambare.com\/blog\/author\/swapnil-zambare\/"}]}},"_links":{"self":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/1662","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/comments?post=1662"}],"version-history":[{"count":1,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/1662\/revisions"}],"predecessor-version":[{"id":2317,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/1662\/revisions\/2317"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media\/1659"}],"wp:attachment":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media?parent=1662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/categories?post=1662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/tags?post=1662"},{"taxonomy":"swapz_series","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/swapz_series?post=1662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}