Installation
This guide covers everything you need to install and configure ng-magary in your Angular application.Prerequisites: Ensure you have an Angular application (v17+) created. If starting fresh, use
ng new my-app or npx @angular/cli new my-app.Quick Install
Choose your preferred package manager:Understanding Dependencies
Core Package
ng-magary (Core Library)
ng-magary (Core Library)
The main component library containing all UI components.Version: 0.0.22What’s Included:
- 50+ standalone Angular components
- TypeScript type definitions
- Component styles (scoped)
- Theme service and utilities
Peer Dependencies
Magary requires several peer dependencies to function properly:@angular/core, @angular/common (Required)
@angular/core, @angular/common (Required)
Version Range:
^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0These are Angular’s core packages. They’re likely already installed in your project.@angular/animations (Required)
@angular/animations (Required)
Version Range:
^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0Powers smooth transitions and animations in Magary components.Why Required: Magary components use Angular’s animation system for:- Dialog enter/exit transitions
- Tooltip fade effects
- Menu slide animations
- Loading states
@angular/cdk (Required)
@angular/cdk (Required)
Version Range:
^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0Angular Component Dev Kit provides foundational behaviors.What It Powers:- Overlay positioning (tooltips, dialogs, menus)
- Accessibility features (a11y module)
- Table virtual scrolling
- Drag-and-drop foundations
@atlaskit/pragmatic-drag-and-drop (Required)
@atlaskit/pragmatic-drag-and-drop (Required)
Version Range:
>=1.7.0 <2High-performance drag-and-drop library from Atlassian.Used By:- MagaryKanban (kanban board)
- MagaryPicklist (dual-list transfer)
- MagaryOrderlist (reorderable lists)
- MagaryTable (column reordering)
lucide & lucide-angular (Required)
lucide & lucide-angular (Required)
Version Range:
>=0.469.0 <1Beautiful, consistent icon library with 1000+ icons.Why Both Packages:lucide: Icon data and definitionslucide-angular: Angular component wrappers
- Button icons
- Menu item icons
- Input prefix/suffix icons
- Navigation icons
gridstack (Required)
gridstack (Required)
Version Range:
^12.0.0Responsive dashboard grid layout engine.Used By:- MagaryGrid (dashboard grid component)
- MagaryGridItem (grid item wrapper)
- Drag-and-drop grid items
- Responsive breakpoints
- Auto-positioning
Step-by-Step Installation
Install Packages
Run the installation command for your package manager:This installs ng-magary and all required peer dependencies.
Configure Animations Provider
Enable animations in your application config (
app.config.ts or main.ts):Import Tooltip Styles (Optional)
If you’re using
MagaryTooltip, import its global styles:styles.scss
Version Compatibility Matrix
| Angular Version | ng-magary | @angular/cdk | @angular/animations |
|---|---|---|---|
| 17.x | ✅ 0.0.22+ | ^17.0.0 | ^17.0.0 |
| 18.x | ✅ 0.0.22+ | ^18.0.0 | ^18.0.0 |
| 19.x | ✅ 0.0.22+ | ^19.0.0 | ^19.0.0 |
| 20.x | ✅ 0.0.22+ | ^20.0.0 | ^20.0.0 |
| 21.x | ✅ 0.0.22+ | ^21.0.0 | ^21.0.0 |
| 16.x or older | ❌ Not supported | - | - |
Troubleshooting
Peer Dependency Warnings
Peer Dependency Warnings
Issue: npm/pnpm warns about peer dependency mismatches.Solution:
-
Check your Angular version:
-
Ensure all Angular packages use the same version:
-
Update mismatched packages:
Icons Not Displaying
Icons Not Displaying
Issue: Icons appear as empty squares or don’t render.Solution:
-
Verify Lucide module is imported in
app.config.ts: -
Check icon name spelling (case-sensitive):
- Ensure you’re using a valid Lucide icon name from lucide.dev
Animations Not Working
Animations Not Working
Issue: Components appear/disappear instantly without transitions.Solution:
-
Add
provideAnimations()to your app config: -
If using SSR/server-side rendering, use
provideNoopAnimations()on the server:
Tooltip Styles Missing
Tooltip Styles Missing
Issue: Tooltips have no background or appear unstyled.Solution:Import tooltip styles in your global Make sure this file is referenced in
styles.scss:angular.json:Build Errors with gridstack
Build Errors with gridstack
Issue: TypeScript or build errors related to gridstack.Solution:
-
Ensure gridstack is properly installed:
- If you’re not using grid components, gridstack is still required as a peer dependency but won’t affect your bundle size (tree-shaking).
Module Not Found Errors
Module Not Found Errors
Issue:
Cannot find module 'ng-magary' or similar errors.Solution:-
Clear node_modules and reinstall:
-
Restart your dev server:
-
Check that ng-magary appears in
node_modules/:
Advanced Configuration
Selective Icon Import
To reduce bundle size, import only the icons you use:app.config.ts
Server-Side Rendering (SSR)
If your app uses Angular Universal or SSR:app.config.server.ts
Standalone vs Module-Based Apps
- Standalone (Recommended)
- Module-Based (Legacy)
Magary is designed for standalone components. Simply import components in your component’s
imports array:Next Steps
Quick Start Guide
Build your first Magary component in 5 minutes
Theming Guide
Customize colors, shadows, and glassmorphism effects
Component Library
Explore all 50+ components with examples
GitHub Issues
Report bugs or request features
