This article ONLY works when using Avonni Creator. Only customers with an active subscription that was activated on or before December 31, 2021 have access to Avonni Creator.
This article is only valid when working on a Creator project.

Make a Component Aware of Its Context

A component can be aware of its record context, its object context, and its width in a region in Lightning App Builder.

  • >> Record Context: If a component with a recordId property is used on a Lightning record page, the page sets the property to the ID of the current record.
  • >> Object Context: If a component with an objectApiName property is used on a Lightning record page, the page sets the property to the API name of the current object.
  • >> Width Aware: When you add a component to a region on a page in the Lightning App Builder, use @api flexipageRegionWidth to pass the region’s width to the component. Then with some strategic CSS, you can tell the component to render in different ways in different regions at run time.

How to access the context settings?

  1. Click the settings icon located next to your component name
  2. Click on the Context tab
  3. Select the Context property you'd like to activate
  4. Then the Context property is automatically added on the Javascript code.
Avonni Designer vs Avonni Builder comparison table

View all the differences between Avonni Designer and Avonni Builder.