Standard components


All Flavour components are denoted as HTML tags or attributes named like this: <prefix>:<component-name>. For example:

<std:foreach var="fib" in="values">
    <html:text value="fib"/>

This fragment uses std:foreach and html:text components. All components are grouped in component packages, denoted by prefixes. Flavour provides a number of standard component packages:

  • std – contains components that correspond to control flow statements of programming languages, for example std:foreach, which renders its body multiple times and std:if, which renders its body only if a certain condition holds.
  • attr – contains components to declare attributes with dynamically computed values.
  • event – contains components to bind events to methods of the view class.
  • html – contains components to work with HTML-specific DOM.

Note that there’s no magic behind these components, they are built upon the same API you can use to create custom components. If you want to learn standard components a little deeper, you can examine their source code.

Improve this page