
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
@react-querybuilder/material
Advanced tools
Custom MUI (Material Design) components for react-querybuilder
Official react-querybuilder compatibility package for MUI/Material Design.
npm i react-querybuilder @react-querybuilder/material @mui/icons-material @mui/material
# OR yarn add / pnpm add / bun add
To configure the query builder to use Material-compatible components, place QueryBuilderMaterial
above QueryBuilder
and beneath MaterialProvider
in the component hierarchy.
import { createTheme, ThemeProvider } from '@mui/material/styles';
import { QueryBuilderMaterial } from '@react-querybuilder/material';
import { useState } from 'react';
import { type Field, QueryBuilder, type RuleGroupType } from 'react-querybuilder';
const muiTheme = createTheme();
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 (
<ThemeProvider theme={muiTheme}>
<QueryBuilderMaterial>
<QueryBuilder fields={fields} defaultQuery={query} onQueryChange={setQuery} />
</QueryBuilderMaterial>
</ThemeProvider>
);
}
QueryBuilderMaterial
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.
Export | QueryBuilder prop |
---|---|
materialControlElements | controlElements |
materialTranslations | translations |
MaterialActionElement | controlElements.actionElement |
MaterialDragHandle | controlElements.dragHandle |
MaterialNotToggle | controlElements.notToggle |
MaterialShiftActions | controlElements.shiftActions |
MaterialValueEditor | controlElements.valueEditor |
MaterialValueSelector | controlElements.valueSelector |
[!TIP]
By default, this package uses icons from
@mui/icons-material
for button labels. To reset button labels to their default strings, usedefaultTranslations
fromreact-querybuilder
.
<QueryBuilderMaterial translations={defaultTranslations}>
[!IMPORTANT]
In environments based on React Server Components, preload the MUI components.
[v8.5.0] - 2025-04-07
autoSelectValue
(documentation) behaves like autoSelectField
/autoSelectOperator
but for the value editor when it renders a select list.
translations
prop object has a new property values
that accepts placeholderName
, placeholderLabel
, and placeholderGroupLabel
properties (documentation). These translatable strings set the default values and labels when autoSelectValue
is set to false
.placeholderValueName
option was added to formatQuery
, which will now ignore rules where the value
matches the placeholder value as long as placeholderValueName
is defined (this behavior differs from placeholderFieldName
and placeholderOperatorName
, which do not need to be defined).translations
option: Map of the words "and", "or", "true", and "false" to their translated equivalents. Also covers prefix and suffix options for rule groups.wordOrder
option: Based on the linguistic concept of constituent word order, this option accepts all permutations of "SVO" ("SOV", "VSO", etc.) and outputs the field, operator, and value in the corresponding order (S = field, V = operator, O = value).operatorMap
option: Map of operators to their natural language equivalents. If the result can differ based on the valueSource
, the key should map to an array where the second element represents the string to be used when valueSource
is "field". The first element will be used in all other cases.@react-querybuilder/datetime
package now supports the "natural_language" format for date-type rules. Formatting can be customized by passing locales
, dateFormat
, or dateTimeFormat
as properties of the context
parameter. These options are passed to a Intl.DateTimeFormat
constructor.react-dnd
and related packages are now obfuscated to discourage bundlers like webpack from pre-processing those imports.FAQs
Custom MUI (Material Design) components for react-querybuilder
The npm package @react-querybuilder/material receives a total of 11,707 weekly downloads. As such, @react-querybuilder/material popularity was classified as popular.
We found that @react-querybuilder/material demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.