diff --git a/BlazorFluentUI/Components/App.razor b/BlazorFluentUI/Components/App.razor index 0a24814..8918ae8 100644 --- a/BlazorFluentUI/Components/App.razor +++ b/BlazorFluentUI/Components/App.razor @@ -8,6 +8,7 @@ + diff --git a/BlazorFluentUI/Components/Layout/NavMenu.razor b/BlazorFluentUI/Components/Layout/NavMenu.razor index f6dc33b..2cba721 100644 --- a/BlazorFluentUI/Components/Layout/NavMenu.razor +++ b/BlazorFluentUI/Components/Layout/NavMenu.razor @@ -14,6 +14,7 @@ Header Footer BodyContent + Grid diff --git a/BlazorFluentUI/Components/Pages/LayoutGrid.razor b/BlazorFluentUI/Components/Pages/LayoutGrid.razor new file mode 100644 index 0000000..ec27a6d --- /dev/null +++ b/BlazorFluentUI/Components/Pages/LayoutGrid.razor @@ -0,0 +1,119 @@ +@page "/layoutgrid" +@using Microsoft.FluentUI.AspNetCore.Components.Extensions + +@rendermode RenderMode.InteractiveServer + + + +Grid + + + The FluentGrid component helps keeping layout consistent across various screen resolutions and sizes. + + + + + Justify + ()) + OptionValue="@(c => c.ToAttributeValue())" + TOption="JustifyContent" + Position="SelectPosition.Below" + @bind-SelectedOption="@justification" /> + + + Spacing + + + + + + + + xs="12" + + + + + xs="12" sm="6" HiddenWhen="GridItemHidden.SmAndDown" + + + + + xs="12" sm="6" + + + + + xs="6" sm="3" + + + + + xs="6" sm="3" + + + + + xs="6" sm="3" + + + + + xs="6" sm="3" + + + + + xs="3" + + + + + @message + + +Breakpoints + + + Breakpoints help you control your layout base on widows size. + + + + Extra Small xd <600px, Small to large phone + + + Small sm <960px, Small to medium tablet + + + Medium md <1280px, Large tablet to laptop + + + Large lg <1920px, Desktop + + + Extra Large xl <2560px, HD and 4k + + + Extra Extra Large xxl =>2560px, 4k+ and ultra-wide + + + + +@code { + JustifyContent justification = JustifyContent.FlexStart; + int spacing = 3; + string message = "Message: "; + + void OnBreakpointEnterHandler(GridItemSize size) + { + message = $"Message: Page size {size}"; + } +} diff --git a/BlazorFluentUI/wwwroot/fluentcustom.css b/BlazorFluentUI/wwwroot/fluentcustom.css new file mode 100644 index 0000000..3903695 --- /dev/null +++ b/BlazorFluentUI/wwwroot/fluentcustom.css @@ -0,0 +1,4 @@ +.fluentslider-300 { + max-width: 300px; + margin-top: 10px +}