> For the complete documentation index, see [llms.txt](https://docs.fact-finder.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fact-finder.com/webcomponents-overview/web-components-4.x./guides/essentials/attributes.md).

# 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.

```html
<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.

```html
<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.

```html
<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`](file:///api/4.x/ff-searchbox#tab=api).

### Object/Array

`Object` attributes are different from other attributes. As mentioned in [element basics](file:///documentation/4.x/communication), all elements are data driven.

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

```javascript
document.querySelector("ff-record-list").records = [ {
        id: "record1",
        record: {
            Title: "Record One",
            price: 15.99
        }
    }, {
        id: "record2",
        record: {
            Title: "Record Two",
            price: 100000.99
        }
    }]
```

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


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fact-finder.com/webcomponents-overview/web-components-4.x./guides/essentials/attributes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
