> For the complete documentation index, see [llms.txt](https://docs.oneweb.tech/oneweb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.oneweb.tech/oneweb/design-and-develop-oneweb-apps/design-and-develop-ux-ui/ux-ui-components/pages/page-features/pgd-directives.md).

# PGD Directives

Page Designer provides features to add custom directives to any element on the screen. These directives are essentially custom properties added to an element. This section shows how to add a PGD directive to an element on Page Designer.

**How to add:** \
&#x20;     Open your Page in Page Designer. \
&#x20;     Click on the element for which you want to add the directive.

![](https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FrbPCWPGj405VRiiXLu1W%2Fimage.png?alt=media\&token=3856555f-4f27-4417-bade-dc03582ea64f)

&#x20;     Click on the Setting and Data tab ![](https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FMhat7LmgkXhfRHrl1xdm%2Fimage.png?alt=media\&token=b9215a50-0a29-40dc-8f87-a0568763411a) on the property editor. \
&#x20;     Click button "+ Add Directive" ![](https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FhMm16qkSALjcTD5HQfyg%2Fimage.png?alt=media\&token=ca51afe5-521a-4b86-91d8-4977dd90bc0d) \
&#x20;     Click on the Add (+) icon

![](https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FFDBi0Nor7BEhhPrPrKpl%2Fimage.png?alt=media\&token=95acf505-6305-49f0-915e-07ed6f692f78)

Enter the attribute you want to add. And choose the value. Users can set a static value to the property or set a value from State. If setting value from state, use syntax {{State.parameterName}}. Click Done once finished

![](https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2Fe9UFE0yKg1fNY8JctFTK%2Fimage.png?alt=media\&token=8fe36490-f985-4501-94ad-c0b51424eb60)

Now save and build the page. On inspection, you can see the attribute is being added to the HTML tag.

![](https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FcPTPoGcwM5vdtXhdbDLK%2Fimage.png?alt=media\&token=c2dbce26-b828-4b96-919f-4af3950e4276)

**Uses of PGD directives:** \
PGD Directives can be used to add custom settings to the element. For e.g. to hide element based on value user can use the ng-hide directive.

![](https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FwqlHZrEUaFd5qP8373pY%2Fimage.png?alt=media\&token=24422a94-ee95-4280-844d-d5f71e0e2006)

Users can use ng-value to add value to an element on condition.

![](https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FmMPzkHy42bHsu49O9b0e%2Fimage.png?alt=media\&token=66a05ec6-b435-43f7-902f-7bfa13e9fb37)

Users can also add value from State or Store.

![](https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2Fe49F3qjN5N1OqzPg1Ipj%2Fimage.png?alt=media\&token=4f5128d3-3d6c-4924-84e6-31607ee3aadc)

Users can use ng-class to set class from the value on State or Store.

![](https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FdKLhWZSR0gWVsbpyq2kK%2Fimage.png?alt=media\&token=71626e64-e875-4672-9c34-f1f4b631b870)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.oneweb.tech/oneweb/design-and-develop-oneweb-apps/design-and-develop-ux-ui/ux-ui-components/pages/page-features/pgd-directives.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
