function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VIKASH CHAND KUMARVIKASH CHAND KUMAR 

How can we call flex card LWC from Normal LWC?

When we activate flex card, it actually converts to LWC.

i have a requirement where i can embed this flex card LWC in the normal LWC.

basically normal LWC is parent and flex card LWC is child. 

 
SubratSubrat (Salesforce Developers) 
Hello ,

Create the Flex Card LWC:
<!-- flexCardLWC.html -->
<template>
  <!-- Flex Card LWC markup and functionality -->
</template>
// flexCardLWC.js
import { LightningElement, api } from 'lwc';

export default class FlexCardLWC extends LightningElement {
  @api cardData;
  // Handle the cardData property changes or perform any necessary actions
}
Use the Flex Card LWC in the Parent LWC:
<!-- parentLWC.html -->
<template>
  <!-- Parent LWC markup -->
  <c-flex-card-lwc card-data={cardData}></c-flex-card-lwc>
</template>
// parentLWC.js
import { LightningElement } from 'lwc';

export default class ParentLWC extends LightningElement {
  cardData = { /* Card data to be passed to Flex Card LWC */ };
  // Handle other functionality in the parent LWC
}
By following these steps, you can embed the Flex Card LWC as a child component within the normal LWC (parent component). You can pass data and handle it accordingly in both the parent and child components.

Hope this helps !
Thank you.