Skip to content

Components

savethekiddes edited this page Mar 4, 2023 · 2 revisions

RapydFramework comes with some custom tags to allow a basic component system.

Standard Component

You can use the RapydFramework commponent tag to replicate a Python Markup Language file inside an existing one, avoiding to write the same thing over and over. You can use the tag accordingly:

rapydfw:component(src="path/to/component.pyml")

Nested Component

The nested component will nest your component inside a (without padding, margin and border). It allows to implement a simple island architecture inside RapydFramework. You can use the tag accordingly:

rapydfw:nested(src="path/to/component.pyml")

Notes about components

Some stuff to remember when using components:

Targeting a component

You have to include the relative path to the component while using this tag. Example:

src="components/hello.pyml"

src="C:/Users/lol/Code/myproject/src/components/hello.pyml"

src="/components/hello.pyml"

src="src/components/hello.pyml"

Styling

To style global component propreties you will have to use a div, as style proprieties are going to be discarded during compile time. Example:

div(style="border-style: solid;"):
    rapydfw:component(src="path/to/component.pyml")

rapydfw:component(style="border-style: solid;" src="path/to/component.pyml")
Clone this wiki locally