🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@react-querybuilder/fluent

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-querybuilder/fluent

Custom Fluent UI components for react-querybuilder

8.6.2
Source
npm
Version published
Weekly downloads
173
-39.93%
Maintainers
1
Weekly downloads
 
Created
Source

@react-querybuilder/fluent

Official react-querybuilder compatibility package for Fluent UI.

Screenshot

Installation

npm i react-querybuilder @react-querybuilder/fluent @fluentui/react-components @fluentui/react-icons-mdl2
# OR yarn add / pnpm add / bun add

Usage

To configure the query builder to use Fluent-compatible components, place QueryBuilderFluent above QueryBuilder and beneath FluentProvider in the component hierarchy.

import { FluentProvider, webLightTheme } from '@fluentui/react-components';
import { QueryBuilderFluent } from '@react-querybuilder/fluent';
import { useState } from 'react';
import { type Field, QueryBuilder, type RuleGroupType } from 'react-querybuilder';

const fields: Field[] = [
  { name: 'firstName', label: 'First Name' },
  { name: 'lastName', label: 'Last Name' },
];

export function App() {
  const [query, setQuery] = useState<RuleGroupType>({ combinator: 'and', rules: [] });

  return (
    <FluentProvider theme={webLightTheme}>
      <QueryBuilderFluent>
        <QueryBuilder fields={fields} defaultQuery={query} onQueryChange={setQuery} />
      </QueryBuilderFluent>
    </FluentProvider>
  );
}

QueryBuilderFluent is a React context provider that assigns the following props to all descendant QueryBuilder elements. The props can be overridden on the QueryBuilder or used directly without the context provider.

ExportQueryBuilder prop
fluentControlElementscontrolElements
fluentTranslationstranslations
FluentActionElementcontrolElements.actionElement
FluentDragHandlecontrolElements.dragHandle
FluentNotTogglecontrolElements.notToggle
FluentShiftActionscontrolElements.shiftActions
FluentValueEditorcontrolElements.valueEditor
FluentValueSelectorcontrolElements.valueSelector

[!TIP]

By default, this package uses icons from @fluentui/react-icons-mdl2 for button labels. To reset button labels to their default strings, use defaultTranslations from react-querybuilder.

<QueryBuilderFluent translations={defaultTranslations}>

Keywords

react

FAQs

Package last updated on 12 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts