---
id: fast-element.elements
title: elements() function
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-element](./fast-element.md) &gt; [elements](./fast-element.elements.md)

## elements() function

Creates a function that can be used to filter a Node array, selecting only elements.

<b>Signature:</b>

```typescript
export declare function elements(selector?: string): ElementsFilter;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  selector | string | An optional selector to restrict the filter to. |

<b>Returns:</b>

[ElementsFilter](./fast-element.elementsfilter.md)
