For the complete documentation index, see llms.txt. This page is also available as Markdown.

Attributes

Use Boolean, String, Object, and Array component attributes correctly.

Every element can have attributes of various types. These types are Boolean, String, Object, and Array. Understanding their differences is important, as this is a common source of error.

Difference between Boolean and String

Boolean

For attributes of type Boolean, only their presence on the HTML element is relevant. Their assigned value is ignored. The presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.

<ff-asn-group opened></ff-asn-group>
<ff-asn-group opened="false"></ff-asn-group>

In both cases, opened evaluates to true regardless of whether a value is assigned.

To have it evaluate to false, omit the attribute altogether.

<ff-asn-group></ff-asn-group> <!-- opened evaluates to false -->

String

Attributes of type String typically have several possible values defined. Only these values are accepted; others are ignored. A value can be case-sensitive depending on the implementation.

<ff-searchbox use-suggest="false"> <!-- evaluates to false -->
<ff-searchbox use-suggest="true"> <!-- evaluates to true -->

See the API section of an element for an overview of possible values. For example, ff-searchbox.

Object/Array

Object attributes are different from other attributes. As mentioned in element basics, all elements are data driven.

For example, ff-record-list has a records property of type Array. You could use it like this:

This triggers the ff-record-list element to render its contained ff-record elements with the specified data.

Last updated

Was this helpful?