Skip to content

Commit 7e4fbc3

Browse files
Merge pull request #6659 from syncfusion-content/983366-appbar
Updated the UG document for AppBar
2 parents e5f66f4 + b636d37 commit 7e4fbc3

File tree

7 files changed

+36
-24
lines changed

7 files changed

+36
-24
lines changed

blazor/appbar/accessibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ documentation: ug
99

1010
# Accessibility in Blazor AppBar Component
1111

12-
The [Blazor AppBar](https://www.syncfusion.com/blazor-components/blazor-appbar) component followed the accessibility guidelines and standards, including [ADA](https://www.ada.gov/), [Section 508](https://www.section508.gov/), [WCAG 2.2](https://www.w3.org/TR/WCAG22/) standards, and [WCAG roles](https://www.w3.org/TR/wai-aria/#roles) that are commonly used to evaluate accessibility.
12+
The Blazor AppBar[Blazor AppBar](https://www.syncfusion.com/blazor-components/blazor-appbar) component is developed to support accessibility and aligns with globally recognized standards for inclusive user interfaces. It follows guidelines from [ADA](https://www.ada.gov/), [Section 508](https://www.section508.gov/), [WCAG 2.2](https://www.w3.org/TR/WCAG22/) standards, and [WCAG roles](https://www.w3.org/TR/wai-aria/#roles) that are commonly used to evaluate accessibility.
1313

1414
The accessibility compliance for the Blazor AppBar component is outlined below.
1515

blazor/appbar/design.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ documentation: ug
99

1010
# Design User Interface with Blazor AppBar Component
1111

12-
## Spacer
12+
## AppBarSpacer
1313

14-
[AppBarSpacer](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.AppBarSpacer.html) is used to provide spacing between the AppBar contents which gives additional space to the content layout.
14+
[AppBarSpacer](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.AppBarSpacer.html) is used to introduce flexible spacing between items within the AppBar. It is particularly useful for pushing content to the left or right, or for creating balanced layouts.
1515

16-
The following example depicts the code to provide spacing between the home and pan buttons in the AppBar:
16+
The following example demonstrates how to use `AppBarSpacer` to provide dynamic spacing between buttons:
1717

1818
```cshtml
1919
@using Syncfusion.Blazor.Navigations
@@ -33,11 +33,11 @@ The following example depicts the code to provide spacing between the home and p
3333
![Blazor AppBar with Spacer.](./images/blazor-appbar-spacer.png)
3434
{% previewsample "https://blazorplayground.syncfusion.com/embed/htLKWVizhrJGeHZk?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
3535

36-
## Separator
36+
## AppBarSeparator
3737

38-
[AppBarSeparator](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.AppBarSeparator.html) shows a vertical line to visually group or separate the AppBar contents.
38+
[AppBarSeparator](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.AppBarSeparator.html) visually divides AppBar contents with a vertical line. This is useful for grouping related actions or types of navigation items.
3939

40-
The following example depicts the code to provide a vertical line between a group of buttons in the AppBar.
40+
The following example shows how to use `AppBarSeparator` to visually group action buttons:
4141

4242
```cshtml
4343
@using Syncfusion.Blazor.Navigations
@@ -70,9 +70,10 @@ The following example depicts the code to provide a vertical line between a grou
7070

7171
![Blazor AppBar with Separator.](./images/blazor-appbar-separator.png)
7272

73-
## Media Query
73+
## Responsive AppBar with Media Queries
7474

75-
Media Query is used to adjusting the AppBar for different screen sizes. Resize the screen to observe the responsive layout of the AppBar.
75+
CSS media queries can be used to create responsive layouts, allowing the AppBar to remain functional and visually consistent across both desktop and mobile devices.
76+
The following example demonstrates how CSS media queries can adjust the AppBar's layout to wrap its content and resize for smaller screens:
7677

7778
```cshtml
7879
@using Syncfusion.Blazor.Navigations
@@ -116,9 +117,9 @@ Media Query is used to adjusting the AppBar for different screen sizes. Resize t
116117

117118
![Blazor AppBar with Media Query.](./images/blazor-appbar-media-quary.png)
118119
{% previewsample "https://blazorplayground.syncfusion.com/embed/hDVUWBsJrBofaJVB?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
119-
## Designing AppBar with Menu
120+
## Designing AppBar with Menu Component
120121

121-
**SfMenu** component can be rendered as a child content of AppBar. You can inherit the AppBar component styles by setting CSS class as `e-inherit` to SfMenu component.
122+
**SfMenu** can be rendered as a child of the `SfAppBar` to create complex navigation structures directly within the application bar. By setting `CssClass="e-inherit"` on the `SfMenu`, it adopts the AppBar's styling.
122123

123124
```cshtml
124125
@using Syncfusion.Blazor.Navigations
@@ -176,7 +177,7 @@ Media Query is used to adjusting the AppBar for different screen sizes. Resize t
176177
![Blazor AppBar with Menu.](./images/blazor-appbar-menu.png)
177178
{% previewsample "https://blazorplayground.syncfusion.com/embed/BXrgCrsfhVRDMsdT?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
178179

179-
## Designing AppBar with Buttons
180+
## Designing AppBar with Buttons and Dropdown Buttons
180181

181182
**SfButton** and **SfDropDownButton** component can be rendered as a child content of AppBar. You can inherit the AppBar component styles by setting CSS class as `e-inherit` to SfButton and SfDropDownButton component.
182183

@@ -208,8 +209,7 @@ Media Query is used to adjusting the AppBar for different screen sizes. Resize t
208209
}
209210
</style>
210211
```
211-
212-
![Blazor AppBar with Buttons.](./images/blazor-appbar-buttons.png)
212+
![Blazor AppBar with Buttons.](./images/blazor-appbar-button&dropdownbutton.png)
213213
{% previewsample "https://blazorplayground.syncfusion.com/embed/VDVgMBMTLrdehyCb?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
214214

215215
## Designing AppBar with SideBar
3.93 KB
Loading
59.8 KB
Loading

blazor/appbar/position.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ documentation: ug
99

1010
# Positioning in Blazor AppBar Component
1111

12-
The position of the AppBar can be set using the [Position](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfAppBar.html#Syncfusion_Blazor_Navigations_SfAppBar_Position) and [IsSticky](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfAppBar.html#Syncfusion_Blazor_Navigations_SfAppBar_IsSticky) property. The AppBar provides the following options for setting its position:
12+
The AppBar component offers flexible control over its placement and behavior within your application's layout. You can configure its position and whether it remains visible during scrolling using the [Position](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfAppBar.html#Syncfusion_Blazor_Navigations_SfAppBar_Position) and [IsSticky](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfAppBar.html#Syncfusion_Blazor_Navigations_SfAppBar_IsSticky) property. The AppBar provides the following options for setting its position:
1313

1414
* Top AppBar
1515
* Bottom AppBar
1616
* Sticky AppBar
1717

1818
### Top AppBar
1919

20-
The top AppBar is the default one in which it positions the AppBar at the top of the content.
20+
A top AppBar is the most common configuration, positioning the AppBar at the top of its parent container or the viewport. This is the default behavior if the `Position` property is not explicitly set.
2121

2222
```cshtml
2323
@using Syncfusion.Blazor.Navigations
@@ -63,7 +63,7 @@ The top AppBar is the default one in which it positions the AppBar at the top of
6363

6464
### Bottom AppBar
6565

66-
This position can be set to the AppBar by setting `AppBarPosition.Bottom` to the property [Position](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfAppBar.html#Syncfusion_Blazor_Navigations_SfAppBar_Position). The bottom AppBar positions the AppBar at the bottom of the content.
66+
A bottom AppBar positions the component at the bottom of its parent container. This position can be set to the AppBar by setting `AppBarPosition.Bottom` to the property [Position](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfAppBar.html#Syncfusion_Blazor_Navigations_SfAppBar_Position).
6767

6868
```cshtml
6969
@using Syncfusion.Blazor.Navigations
@@ -109,7 +109,7 @@ This position can be set to the AppBar by setting `AppBarPosition.Bottom` to the
109109

110110
### Sticky AppBar
111111

112-
This position can be set to the AppBar by setting `true` to the property [IsSticky](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfAppBar.html#Syncfusion_Blazor_Navigations_SfAppBar_IsSticky). AppBar will be sticky while scrolling the AppBar content.
112+
A sticky AppBar remains visible at the top of the viewport even when the page content is scrolled.This position can be set to the AppBar by setting `true` to the property [IsSticky](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfAppBar.html#Syncfusion_Blazor_Navigations_SfAppBar_IsSticky).
113113

114114
```cshtml
115115
@using Syncfusion.Blazor.Navigations

blazor/appbar/size-and-color.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ documentation: ug
99

1010
# Size and Color with Blazor AppBar Component
1111

12+
The AppBar component offers extensive customization options for its visual `Size` (height) and `Color` scheme.
13+
1214
## Size
1315

1416
The size of the AppBar can be set using the [Mode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfAppBar.html#Syncfusion_Blazor_Navigations_SfAppBar_Mode) property. The available types of the Blazor AppBar are as follows:
@@ -124,7 +126,7 @@ This height mode can be set to the AppBar by setting `AppBarMode.Dense` to the p
124126
![Blazor AppBar with Dense Size](./images/dense_appbar.png)
125127
{% previewsample "https://blazorplayground.syncfusion.com/embed/VthKirWTrCLzRlMA?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
126128

127-
## Color
129+
## AppBar ColorMode
128130

129131
The background and font colors can be set using the [ColorMode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfAppBar.html#Syncfusion_Blazor_Navigations_SfAppBar_ColorMode) property. The available types of background color for the Blazor AppBar are as follows:
130132

@@ -135,7 +137,7 @@ The background and font colors can be set using the [ColorMode](https://help.syn
135137

136138
### Light AppBar
137139

138-
This color mode is the default one in which the AppBar can be displayed with a light background and its corresponding font color.
140+
This is the default color mode, displaying the AppBar with a light background and corresponding dark text/icon colors for high contrast and readability.
139141

140142
```cshtml
141143
@using Syncfusion.Blazor.Navigations

blazor/appbar/style-and-appearance.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ documentation: ug
99

1010
# Styles and Appearances in Blazor AppBar Component
1111

12-
To modify the AppBar appearance, you need to override the default CSS of the AppBar component. Find the list of CSS classes and their corresponding sections in the AppBar component. Also, you have an option to create your own custom theme for the controls using our [Theme Studio](https://blazor.syncfusion.com/themestudio/?theme=material).
12+
The AppBar component is highly customizable, allowing you to tailor its visual presentation to perfectly fit your application's design language. This document outlines various methods to modify the AppBar's appearance, focusing on overriding default CSS, utilizing custom classes, and applying HTML attributes.
13+
14+
For comprehensive custom theming across Syncfusion controls, the [Theme Studio](https://blazor.syncfusion.com/themestudio/?theme=material) offers an intuitive interface to create and manage personalized custom themes efficiently.
15+
16+
## Customizing AppBar Elements with CSS Classes
17+
18+
The AppBar component includes a set of default CSS classes that can be targeted to customize its appearance. Below is a list of commonly used classes and their respective purposes:
1319

1420
|CSS Class | Purpose of Class |
1521
|-----|----- |
@@ -25,7 +31,9 @@ N> You can change the prominent AppBar height if larger titles, images, or texts
2531

2632
## CssClass
2733

28-
CssClass is used for AppBar customization based on the custom class. In the example below, the AppBar background and color are customized using the [CssClass](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfAppBar.html#Syncfusion_Blazor_Navigations_SfAppBar_CssClass) property.
34+
The `CssClass` property of the `SfAppBar` component assigns a custom CSS class to its root HTML element. This provides a clean way to introduce your own styles or completely override existing ones.
35+
36+
In the example below, the AppBar background and color are customized using the [CssClass](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfAppBar.html#Syncfusion_Blazor_Navigations_SfAppBar_CssClass) property.
2937

3038
```cshtml
3139
@using Syncfusion.Blazor.Navigations
@@ -50,7 +58,9 @@ CssClass is used for AppBar customization based on the custom class. In the exam
5058

5159
## HtmlAttributes
5260

53-
It can be used for additional inline attributes by specifying as inline attributes or by specifying `@attributes` directive. In the code example below, the aria-label of the AppBar is customized by specifying as inline attributes.
61+
The `SfAppBar` component provides the `HtmlAttributes` property (via the `@attributes` directive) to allow you to add any standard HTML attribute directly to the root element (`<div>`) of the AppBar. This is particularly useful for adding ARIA attributes for accessibility, custom `data-` attributes, or IDs.
62+
63+
In the example below, an `aria-label` attribute is added to the AppBar to provide an accessible name for screen reader users.
5464

5565
```cshtml
5666
@using Syncfusion.Blazor.Navigations
@@ -62,4 +72,4 @@ It can be used for additional inline attributes by specifying as inline attribut
6272
</SfAppBar>
6373
</div>
6474
```
65-
{% previewsample "https://blazorplayground.syncfusion.com/embed/BjVgWBizBhGaNVBq?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
75+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BjVgWBizBhGaNVBq?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}

0 commit comments

Comments
 (0)