From 00cdd57499cd7e8d1ef1258f8968c97cfb778e6a Mon Sep 17 00:00:00 2001 From: jfboeve Date: Wed, 21 Oct 2026 10:15:34 +0200 Subject: [PATCH 1/2] Added ref-attribute documentation --- docs/essentials/element_attributes.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/essentials/element_attributes.md b/docs/essentials/element_attributes.md index 5ffd4c28..7ee2e79e 100644 --- a/docs/essentials/element_attributes.md +++ b/docs/essentials/element_attributes.md @@ -232,6 +232,18 @@ You can also use built-in shader attributes in combination with eachother f.e; ``` +### Adding a Referance + +You can add a reference to an element by using the `ref` attribute. + +```xml + + + +``` + +With a `ref` setup you can use it the `$select` method inside the same component where the element is referenced in its template. For more information follow this [link](https://lightningjs.io/v3-docs/blits/components/utility_methods.html#select) + ### Using shader attribute > [!WARNING] > This attribute does not work in combination with the built-in element shader attributes. This has to do with the complexity of shaders that makes mixing and matching quite heavy on performance. From b496385c172255740d60e903e23065f71cca7734 Mon Sep 17 00:00:00 2001 From: jfboeve Date: Thu, 22 Oct 2026 09:58:55 +0200 Subject: [PATCH 2/2] applied changes to docs per comments --- docs/essentials/element_attributes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/essentials/element_attributes.md b/docs/essentials/element_attributes.md index 7ee2e79e..ce61070f 100644 --- a/docs/essentials/element_attributes.md +++ b/docs/essentials/element_attributes.md @@ -234,7 +234,7 @@ You can also use built-in shader attributes in combination with eachother f.e; ### Adding a Referance -You can add a reference to an element by using the `ref` attribute. +You can add a reference to an Element or Component by using the `ref` attribute. ```xml @@ -242,7 +242,7 @@ You can add a reference to an element by using the `ref` attribute. ``` -With a `ref` setup you can use it the `$select` method inside the same component where the element is referenced in its template. For more information follow this [link](https://lightningjs.io/v3-docs/blits/components/utility_methods.html#select) +With a `ref` setup you can use it the `$select` method inside the same Component where the Element is referenced in its template. For more information follow view [Utility Methods](../components/utility_methods.md#select) or for similar but more advanced built-in features view [Directives](../built-in/directives.md) ### Using shader attribute > [!WARNING]