Guide

Query is a library built specifically for web components to make it easy to interact with a page’s DOM and shadow DOM in a chainable way.

Usage Guide - If you are new to Query it is recommended you check out the user guide before reading the API references.

Installation

Query can be used as a standalone package or alongside templating and other core features.

Terminal window
npm install @semantic-ui/query

Query Sections

The Query library is organized into several categories:

  • Basic Usage - Basic usage of Query and initialization.
  • Attributes - Accessing attributes.
  • Components - Accessing UI components.
  • Content - Accessing DOM content.
  • CSS - Getting and setting CSS values.
  • Size & Dimensions - Getting and setting width, height, offset and dimensions.
  • DOM Manipulation - Inserting, removing, or creating DOM content.
  • DOM Traversal - Traversing the DOM to access content.
  • Events - Binding, triggering and removing events.
  • Iterators - Looping through DOM elements to execute a function, filter, or map.
  • Logical Operators - Modifying a query collection using selectors or functions
  • Utilities - Utilities for manipulating the query objecgt