Display an Album in a Lightning Web Component

In this article, you will learn how to call the component SharinPix Album (LWC) as a child in another parent component.

Call SharinPix Album (LWC) inside Lightning Web Component

  • The sample code below shows how to call the **SharinPix Album (LWC) **inside the markup of a Lightning Web Component.

    <template>
        <sharinpix-album record-id={recordId} enable-image-sync={enableImageSync} 
        height={height} fullscreen-allowed={fullscreenAllowed} 
        enable-action={enableAction} enable-toast={enableToast} 
        permission-id={permissionId} tags={tags} auto-tags={autoTags} 
        component-id={componentId}></sharinpix-album>
    </template>
    import { LightningElement, api } from 'lwc';
    
    export default class ParentAlbum extends LightningElement {
        @api recordId
        enableImageSync = true
        height = 600
        fullscreenAllowed = true
        enableAction = true
        enableToast = true
        permissionId = 'SharinPixPermissionName'
        tags = 'tag1;tag2'
        autoTags = 'autoTag1'
        componentId = 'album'
    }

**Note: **

  • The parameter's value can be modified as per your use-case.

  • The SharinPixPermissionName highlighted above should be replaced with the name or Id of a SharinPix Permission.

Last updated