You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -55,21 +61,56 @@ A modern, lightweight Blazor component library for creating **CSS Grid Layouts**
55
61
56
62
---
57
63
58
-
## Configuration
59
-
60
-
### SimpleGrid (Container)
61
-
- Columns: string (e.g., "1fr 100px")
62
-
- Rows: string (optional)
63
-
- Gap: string (combined shorthand)
64
-
- TemplateAreas: string (separated by |)
65
-
- Horizontal: HorizontalAlignment Enum
66
-
- AutoFlow: GridAutoFlow Enum
67
-
68
-
### SimpleGridItem (Element)
69
-
- Area: string (assigned area name)
70
-
- ColumnSpan: int (span count)
71
-
- RowSpan: int (span count)
72
-
- Horizontal: HorizontalAlignment (Self)
64
+
## Global Configuration (Optional)
65
+
66
+
You can define project-wide defaults for your grids using the SimpleGridOptions. This is useful for maintaining consistent spacing and alignment across your entire application without repeating parameters on every component.
67
+
68
+
### 1. Registration in Program.cs
69
+
70
+
You can register the services in your Program.cs file.:
71
+
72
+
Custom Global Defaults
73
+
This allows you to override any property for all grids in your app.
74
+
```csharp
75
+
builder.Services.AddSimpleGrid(options=> { options.HorizontalGap="20px"; options.VerticalGap="20px"; options.ItemHorizontalAlignment=HorizontalAlignment.Center; options.Columns="1fr 1fr"; // All grids will default to 2 columns });
0 commit comments