# Other types of UI Widgets In addition to the [new reusable UI widgets](https://firefox-source-docs.mozilla.org/browser/components/storybook/docs/README.reusable-widgets.stories.html) there are existing elements that serve a similar role. These older elements are broken down into two groups: Mozilla Custom Elements and User Agent (UA) Widgets. Additionally, we also have domain-specific widgets that are similar to the reusable widgets but are created to serve a specific need and may or may not adhere to the Design Systems specifications. ## Older custom elements in `toolkit/widgets` There are existing UI widgets in `toolkit/content/widgets/` that belong to one of two groups: Mozilla Custom Elements or User Agent (UA) Widgets. These [existing custom elements](https://searchfox.org/mozilla-central/rev/cde3d4a8d228491e8b7f1bd94c63bbe039850696/toolkit/content/customElements.js#792-809,847-866) are loaded into all privileged main process documents automatically. You can determine if a custom element belongs to the existing UI widgets category by either [viewing the array](https://searchfox.org/mozilla-central/rev/cde3d4a8d228491e8b7f1bd94c63bbe039850696/toolkit/content/customElements.js#792-809,847-866) or by viewing the [files in toolkit/content/widgets](https://searchfox.org/mozilla-central/source/toolkit/content/widgets). Additionally, these older custom elements are a mix of XUL and HTML elements. ### Mozilla Custom Elements Unlike newer reusable UI widgets, the older Mozilla Custom Elements do not have a dedicated directory. For example `arrowscrollbox.js` is an older single file custom element versus `moz-button-group/moz-button-group.mjs` which exemplifies the structure followed by newer custom elements. ### User Agent (UA) widgets User agent (UA) widgets are like custom elements but run in per-origin UA widget scope instead of the chrome or content scope. There are a much smaller number of these widgets compared to the Mozilla Custom Elements: - [datetimebox.js](https://searchfox.org/mozilla-central/source/toolkit/content/widgets/datetimebox.js) - [marquee.js](https://searchfox.org/mozilla-central/source/toolkit/content/widgets/marquee.js) - [textrecognition.js](https://searchfox.org/mozilla-central/source/toolkit/content/widgets/textrecognition.js) - [videocontrols.js](https://searchfox.org/mozilla-central/source/toolkit/content/widgets/videocontrols.js) Please refer to the existing [UA widgets documentation](https://firefox-source-docs.mozilla.org/toolkit/content/toolkit_widgets/ua_widget.html) for more details. ### How to use existing Mozilla Custom Elements The existing Mozilla Custom Elements are automatically imported into all chrome privileged documents. These existing elements do not need to be imported individually via ` ``` Or use `window.ensureCustomElements("")` as previously stated in [the using new design system components section.](#using-new-design-system-components)