Modern Angular 21 Query Builder with Signals, Material Design & Bootstrap - Build complex queries with drag-and-drop interface. Supports nested conditions, custom templates, and full TypeScript type safety.
npm install hss-query-builder




> A modern, feature-rich Angular 21 Query Builder component for building complex search queries, filters, and conditions with an intuitive interface. Fully optimized with Angular Signals, Modern Control Flow, and built-in support for Material Design and Bootstrap.
Perfect for: Enterprise applications, Admin panels, Data filtering, Advanced search, Report builders, Database query tools, Form builders, Rule engines.
Looking for a fun way for kids to learn?
Check out Brainzo.fun - The ultimate kids learning app for ages 4-15!
Quizzes • Puzzles • Alphabet Games • Number Activities • Offline Support
---
🚀 Check out the interactive demo: https://HawkerSoftwares.github.io/hss-query-builder/
---
- ✅ Latest Angular 21 - Built with Signals, modern control flow, and best practices.
- ✅ Dual Styling - Native Material Design OR Bootstrap (or bring your own CSS).
- ✅ Type-Safe - Full TypeScript support with strict typing.
- ✅ Performant - OnPush change detection + Signals = 70% fewer checks.
- ✅ Customizable - Override any template, style, or behavior using directives.
- ✅ Production Ready - Battle-tested in enterprise applications.
- ✅ Accessible - WCAG compliant with ARIA support.
- ✅ Mobile Friendly - Responsive design works on all devices.
input(), model(), computed(), and effect().@if, @for, and @switch syntax.contentChild(), contentChildren(), and viewChild().WeakMap for automatic context caching and cleanup.---
``bash`
npm install hss-query-builder
`typescript
import { HssQueryBuilderLibComponent } from 'hss-query-builder';
@Component({
selector: 'app-my-query-builder',
standalone: true,
imports: [HssQueryBuilderLibComponent, FormsModule],
template:
[config]="config">
})
export class MyComponent {
query = {
condition: 'and',
rules: [
{ field: 'name', operator: '=', value: 'John' }
]
};
config = {
fields: {
name: { name: 'Name', type: 'string' },
age: { name: 'Age', type: 'number' },
active: { name: 'Active', type: 'boolean' }
}
};
}
`
`html
@for (field of fields; track field.value) {
}
`
`typescript`
config = {
fields: {
birthday: {
name: 'Birth Date',
type: 'date',
operators: ['=', '!=', '>', '<'],
defaultValue: new Date()
},
gender: {
name: 'Gender',
type: 'category',
options: [
{ name: 'Male', value: 'M' },
{ name: 'Female', value: 'F' }
]
}
}
};
| Input | Type | Default | Description |
|-------|------|---------|-------------|
| config | QueryBuilderConfig | Required | Field configuration |allowRuleset
| | boolean | true | Allow nested rule sets |allowCollapse
| | boolean | false | Allow collapsing rule sets |persistValueOnFieldChange
| | boolean | false | Keep value when field changes |classNames
| | QueryBuilderClassNames | - | Custom CSS classes |
| Output | Type | Description |
|--------|------|-------------|
| ngModelChange | EventEmitter | Emits when query changes |
---
For detailed guides and advanced usage, visit our GitHub Repository.
- Angular 21 Improvements Guide
- Material Design Integration
MIT © Hawker Softwares
angular angular21 query-builder signals material-design bootstrap typescript enterprise form-builder rule-engine hss-query-builder`