Skip to content

Commit 10dfd1e

Browse files
committed
983366: Updated the UG for Card Component
1 parent b35207a commit 10dfd1e

File tree

9 files changed

+92
-95
lines changed

9 files changed

+92
-95
lines changed

blazor/card/action-buttons.md

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

1010
# Action Buttons in Blazor Card Component
1111

12-
You can include action buttons within the Card and customize them. Action button is a `div` element with `CardFooter` component followed by button tag or anchor tag within the card root element.
12+
The Blazor Card component allows you to include and customize action buttons within its structure. Action buttons are typically placed in the `CardFooter` section of the Card. This document explains how to add these buttons and control their alignment.
1313

14-
For adding action buttons, you can create a `CardFooterContent` component within the card action element.
14+
Action buttons are rendered within the `<CardFooter>` section. You can define either a single button or multiple buttons directly inside the `CardFooterContent` of the `CardFooter` component. The `CardFooterContent` is a `RenderFragment` property that accepts any Blazor UI elements.
1515

1616
```cshtml
1717
@using Syncfusion.Blazor.Cards
@@ -27,7 +27,7 @@ For adding action buttons, you can create a `CardFooterContent` component withi
2727

2828
## Vertical
2929

30-
By default, action buttons are aligned horizontally. They can also be aligned vertically by adding the `Orientation` property.
30+
By default, action buttons within the `CardFooter` are aligned horizontally. To align them vertically, set the `Orientation` property of the `SfCard` component to `CardOrientation.Vertical`.
3131

3232
```cshtml
3333
@using Syncfusion.Blazor.Cards

blazor/card/card-image.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ documentation: ug
1313

1414
## Images
1515

16-
The Card supports to include images within the elements, you can add image as direct element anywhere inside card root by adding the `CardImage` component . Using the class defined, you can write CSS styles to load images to that element.
16+
The Blazor Card component allows you to include images within its structure using the [`CardImage`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Cards.CardImage.html) component. You can add the `<CardImage>` component directly inside the `<SfCard>` element.
1717

1818
N> By default, card images occupies full width of its parent element.
1919

20+
The CardImage supports direct specification of the image source using its `Image` property. Additionally, it can include an `Alt` property for improved accessibility, providing alternative text for the image.
21+
2022
```cshtml
2123
@using Syncfusion.Blazor.Cards
2224
@@ -28,7 +30,7 @@ N> By default, card images occupies full width of its parent element.
2830

2931
### Title
3032

31-
Card image is supported to include a `Title` property for the image. By default, Title is placed over the image on left-bottom position with overlay.
33+
To apply custom CSS styles to an image within a `CardImage` component, you can define a CSS class and apply it using the `CssClass` property. This allows for advanced styling such as background images, specific sizing, or positioning.
3234

3335
```cshtml
3436
@using Syncfusion.Blazor.Cards
@@ -43,10 +45,11 @@ Card image is supported to include a `Title` property for the image. By default,
4345
</SfCard>
4446
```
4547
{% previewsample "https://blazorplayground.syncfusion.com/embed/rDVUihLBhHVhadTB?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
48+
![Blazor Card Component with Title](images/Title-card.png)
4649

4750
## Divider
4851

49-
Divider used to separate the elements inside the card. You can add divider inside the card elements to separate it. Set `EnableSeparator` property to `true` in card content for adding a divider.
52+
Dividers are used to visually separate elements within the Card. To add a divider below a `CardContent` component, set its [`EnableSeparator`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Cards.CardContent.html#Syncfusion_Blazor_Cards_CardContent_EnableSeparator) property to `true`.
5053

5154
```cshtml
5255
@using Syncfusion.Blazor.Cards
@@ -68,4 +71,5 @@ Divider used to separate the elements inside the card. You can add divider insid
6871
</SfCard>
6972
7073
```
71-
{% previewsample "https://blazorplayground.syncfusion.com/embed/hZhqsVBBLnBeVrnG?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
74+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hZhqsVBBLnBeVrnG?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
75+
![Blazor Card Component with Divider](images/Divider-card.png)

blazor/card/getting-started-with-web-app.md

Lines changed: 29 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ layout: post
33
title: Getting Started with Syncfusion Blazor Card Component in Web App
44
description: Checkout and learn about the documentation for getting started with Blazor Card Component in Blazor Web App.
55
platform: Blazor
6-
component: Card
6+
control: Card
77
documentation: ug
88
---
99

10-
# Getting Started with Blazor Card Component in Web App
10+
# Getting Started with Blazor Card Component in a Web App
1111

12-
This section briefly explains about how to include [Blazor Card](https://www.syncfusion.com/blazor-components/blazor-card) component in your Blazor Web App using [Visual Studio](https://visualstudio.microsoft.com/vs/) and Visual Studio Code.
12+
This section explains how to include the Syncfusion[Blazor Card](https://www.syncfusion.com/blazor-components/blazor-card) component in your Blazor Web App using [Visual Studio](https://visualstudio.microsoft.com/vs/) or Visual Studio Code.
1313

1414
{% tabcontents %}
1515

@@ -21,17 +21,17 @@ This section briefly explains about how to include [Blazor Card](https://www.syn
2121

2222
## Create a new Blazor Web App in Visual Studio
2323

24-
You can create a **Blazor Web App** using Visual Studio 2022 via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vs) or the [Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-integration/template-studio).
24+
Create a **Blazor Web App** using Visual Studio 2022 via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vs) or the [Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-integration/template-studio).
2525

26-
You need to configure the corresponding [Interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0#render-modes) and [Interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vs) while creating a Blazor Web Application.
26+
During project creation, configure the appropriate[Interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0#render-modes) and [Interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vs) while creating a Blazor Web Application.
2727

2828
## Install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Cards and Themes NuGet in the Blazor Web App
2929

30-
To add **Blazor Card** component in the app, open the NuGet package manager in Visual Studio (*Tools → NuGet Package Manager → Manage NuGet Packages for Solution*), search and install [Syncfusion.Blazor.Cards](https://www.nuget.org/packages/Syncfusion.Blazor.Cards/) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/).
30+
To add **Blazor Card** component, open the NuGet package manager in Visual Studio (*Tools → NuGet Package Manager → Manage NuGet Packages for Solution*), then search for and install [Syncfusion.Blazor.Cards](https://www.nuget.org/packages/Syncfusion.Blazor.Cards/) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/).
3131

32-
If you utilize `WebAssembly or Auto` render modes in the Blazor Web App need to be install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components NuGet packages within the client project.
32+
If the Blazor Web App uses the `WebAssembly or Auto` render modes, ensure the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor component NuGet packages are installed in the client project.
3333

34-
Alternatively, you can utilize the following package manager command to achieve the same.
34+
Alternatively, the Package Manager Console can be used to install the required NuGet package
3535

3636
{% tabs %}
3737
{% highlight C# tabtitle="Package Manager" %}
@@ -42,7 +42,7 @@ Install-Package Syncfusion.Blazor.Themes -Version {{ site.releaseversion }}
4242
{% endhighlight %}
4343
{% endtabs %}
4444

45-
N> Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components are available in [nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). Refer to [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) topic for available NuGet packages list with component details.
45+
N> Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components are available in [nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). Refer to [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) topic for a detailed list.
4646

4747
{% endtabcontent %}
4848

@@ -52,11 +52,11 @@ N> Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components are availa
5252

5353
* [System requirements for Blazor components](https://blazor.syncfusion.com/documentation/system-requirements)
5454

55-
## Create a new Blazor Web App in Visual Studio Code
55+
## Create a New Blazor Web App in Visual Studio Code
5656

57-
You can create a **Blazor Web App** using Visual Studio Code via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vsc) or the [Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-code-integration/create-project).
57+
Create a **Blazor Web App** using Visual Studio Code via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vsc) or the [Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-code-integration/create-project).
5858

59-
You need to configure the corresponding [Interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0#render-modes) and [Interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vsc) while creating a Blazor Web Application.
59+
Configure the corresponding [Interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0#render-modes) and [Interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vsc) while creating a Blazor Web Application.
6060

6161
For example, in a Blazor Web App with the `Auto` interactive render mode, use the following commands.
6262

@@ -70,15 +70,15 @@ cd BlazorWebApp.Client
7070
{% endhighlight %}
7171
{% endtabs %}
7272

73-
N> For more information on creating a **Blazor Web App** with various interactive modes and locations, refer to this [link](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app?tabcontent=visual-studio-code#render-interactive-modes).
73+
N> For more details on creating a **Blazor Web App** with various interactive modes and locations, refer to this [link](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app?tabcontent=visual-studio-code#render-interactive-modes).
7474

7575
## Install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Cards and Themes NuGet in the App
7676

77-
If you utilize `WebAssembly` or `Auto` render modes in the Blazor Web App need to be install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components NuGet packages within the client project.
77+
If the Blazor Web App uses the `WebAssembly or Auto` render modes, ensure the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor component NuGet packages are installed in the client project.
7878

7979
* Press <kbd>Ctrl</kbd>+<kbd>`</kbd> to open the integrated terminal in Visual Studio Code.
80-
* Ensure you’re in the project root directory where your `.csproj` file is located.
81-
* Run the following command to install a [Syncfusion.Blazor.Cards](https://www.nuget.org/packages/Syncfusion.Blazor.Cards) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/) NuGet package and ensure all dependencies are installed.
80+
* Ensure you are in the project root directory where your `.csproj` file is located.
81+
* Run the following commands to install the [Syncfusion.Blazor.Cards](https://www.nuget.org/packages/Syncfusion.Blazor.Cards) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/) NuGet package and ensure all dependencies are installed.
8282

8383
{% tabs %}
8484

@@ -92,7 +92,7 @@ dotnet restore
9292

9393
{% endtabs %}
9494

95-
N> Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components are available in [nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). Refer to [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) topic for available NuGet packages list with component details.
95+
N> Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components are available in [nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). Refer to [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) topic for a detailed list.
9696

9797
{% endtabcontent %}
9898

@@ -116,9 +116,9 @@ Import the `Syncfusion.Blazor` and `Syncfusion.Blazor.Cards` namespace.
116116
{% endhighlight %}
117117
{% endtabs %}
118118

119-
Now, register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Service in the **~/Program.cs** file of your Blazor Web App.
119+
Next, register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Service in the **~/Program.cs** file of your Blazor Web App.
120120

121-
If the **Interactive Render Mode** is set to `WebAssembly` or `Auto`, you need to register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor service in both **~/Program.cs** files of your Blazor Web App.
121+
If the **Interactive Render Mode** is set to `WebAssembly` or `Auto`, register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor service in both the **Server project's `Program.cs`** and the **Client project's `Program.cs`**.
122122

123123
{% tabs %}
124124
{% highlight c# tabtitle="Server(~/_Program.cs)" hl_lines="3 11" %}
@@ -173,7 +173,7 @@ var app = builder.Build();
173173
{% endhighlight %}
174174
{% endtabs %}
175175

176-
## Add stylesheet and script resources
176+
## Add Stylesheet and Script Resources
177177

178178
The theme stylesheet and script can be accessed from NuGet through [Static Web Assets](https://blazor.syncfusion.com/documentation/appearance/themes#static-web-assets). Include the stylesheet reference in the `<head>` section and the script reference at the end of the `<body>` in the **~/Components/App.razor** file as shown below:
179179

@@ -191,9 +191,9 @@ The theme stylesheet and script can be accessed from NuGet through [Static Web A
191191

192192
N> Check out the [Blazor Themes](https://blazor.syncfusion.com/documentation/appearance/themes) topic to discover various methods ([Static Web Assets](https://blazor.syncfusion.com/documentation/appearance/themes#static-web-assets), [CDN](https://blazor.syncfusion.com/documentation/appearance/themes#cdn-reference), and [CRG](https://blazor.syncfusion.com/documentation/common/custom-resource-generator)) for referencing themes in your Blazor application. Also, check out the [Adding Script Reference](https://blazor.syncfusion.com/documentation/common/adding-script-references) topic to learn different approaches for adding script references in your Blazor application.
193193

194-
## Add Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Card component
194+
## Add Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Card Component
195195

196-
Add the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Card component in `.razor` file inside the `Pages` folder. If an interactivity location as `Per page/component` in the web app, define a render mode at top of the component, as follows:
196+
Add the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Card component to a `.razor` file inside the `Pages` folder. If the interactivity location is `Per page/component` in the web app, define a render mode at top of the component, as follows:
197197

198198
| Interactivity location | RenderMode | Code |
199199
| --- | --- | --- |
@@ -223,28 +223,22 @@ N> If an **Interactivity Location** is set to `Global` and the **Render Mode** i
223223

224224
* Press <kbd>Ctrl</kbd>+<kbd>F5</kbd> (Windows) or <kbd>⌘</kbd>+<kbd>F5</kbd> (macOS) to launch the application. This will render the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Card component in your default web browser.
225225

226-
## Add header and content
226+
## Add Header and Content
227227

228-
You can add the header by using [CardHeader](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Cards.CardHeader.html) tag and add [Title](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Cards.CardHeader.html#Syncfusion_Blazor_Cards_CardHeader_Title) and [SubTitle](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Cards.CardHeader.html#Syncfusion_Blazor_Cards_CardHeader_SubTitle) in that tag. You can also add the content by using [CardContent](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Cards.CardContent.html) tag.
228+
Add the header by using [CardHeader](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Cards.CardHeader.html) tag and add [Title](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Cards.CardHeader.html#Syncfusion_Blazor_Cards_CardHeader_Title) and [SubTitle](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Cards.CardHeader.html#Syncfusion_Blazor_Cards_CardHeader_SubTitle) in that tag. You can also add the content by using [CardContent](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Cards.CardContent.html) tag.
229229

230230
{% tabs %}
231231
{% highlight cshtml %}
232232

233-
<div class="control-section">
234-
<div class="row">
235-
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
236-
<SfCard>
237-
<CardHeader Title="Debunking Five Data Science Myths" SubTitle="By John Doe | Jan 20, 2018" />
238-
<CardContent Content="Tech evangelists are currently pounding their pulpits about all things AI, machine learning, analytics—anything that sounds like the future and probably involves lots of numbers. Many of these topics can be grouped under the intimidating term data science." />
239-
</SfCard>
240-
</div>
241-
</div>
242-
</div>
233+
<SfCard>
234+
<CardHeader Title="Debunking Five Data Science Myths" SubTitle="By John Doe | Jan 20, 2018" />
235+
<CardContent Content="Tech evangelists are currently pounding their pulpits about all things AI, machine learning, analytics—anything that sounds like the future and probably involves lots of numbers. Many of these topics can be grouped under the intimidating term data science." />
236+
</SfCard>
243237

244238
{% endhighlight %}
245239
{% endtabs %}
246240

247-
{% previewsample "https://blazorplayground.syncfusion.com/embed/LjLzZshSzfQZOzAc?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Blazor Card Component](images/blazor-card-component.png)" %}
241+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hZheXOBTqXIZkPzh?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Blazor Card Component](images/blazor-card-component.png)" %}
248242

249243
N> [View Sample in GitHub](https://github.com/SyncfusionExamples/Blazor-Getting-Started-Examples/tree/main/Card).
250244

0 commit comments

Comments
 (0)