### Quick Start Bar Chart Example Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/charts A basic example demonstrating how to create a bar chart with two data series (Desktop and Mobile) using the ChartContainer, BarChart, and related components. Ensure chart configuration and data are correctly defined before use. ```csharp var chartConfig = new ChartConfig { ["desktop"] = new ChartConfigEntry { Label = "Desktop", Color = "hsl(var(--chart-1))" }, ["mobile"] = new ChartConfigEntry { Label = "Mobile", Color = "hsl(var(--chart-2))" } }; var chartData = new List> { new() { ["month"] = "January", ["desktop"] = 186, ["mobile"] = 80 }, new() { ["month"] = "February", ["desktop"] = 305, ["mobile"] = 200 }, new() { ["month"] = "March", ["desktop"] = 237, ["mobile"] = 120 }, new() { ["month"] = "April", ["desktop"] = 73, ["mobile"] = 190 }, new() { ["month"] = "May", ["desktop"] = 209, ["mobile"] = 130 }, new() { ["month"] = "June", ["desktop"] = 214, ["mobile"] = 140 }, }.Cast().ToList(); ``` ```razor ``` -------------------------------- ### Install ShadCn.Blazor via .NET CLI Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/installation Use the .NET CLI to add the ShadCn.Blazor.Components package to your project. ```bash dotnet add package ShadCn.Blazor.Components ``` -------------------------------- ### Success and Tip Alerts Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/alert Examples of alerts for success messages and helpful tips. The tip example demonstrates inline HTML elements like . ```razor Success! Your payment was processed successfully. Tip Press Ctrl + K to open the command menu. ``` -------------------------------- ### Install ShadCn.Blazor via Package Manager Console Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/installation Use the Package Manager Console in Visual Studio to install the ShadCn.Blazor.Components package. ```powershell Install-Package ShadCn.Blazor.Components ``` -------------------------------- ### Configure First Day of Week Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/calendar Customize the starting day of the week for the calendar view. Examples show setting Monday and Sunday as the first day. ```razor @* Start week on Monday (European style) *@ @* Start week on Sunday (US style) *@ ``` -------------------------------- ### Example Usage of ShadCn.Blazor Components Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/installation Demonstrates how to use Button, Card, and Alert components in your Blazor pages or components. ```razor Welcome Get started with ShadCn.Blazor

Your content here

Heads up! You can customize all components. ``` -------------------------------- ### FAQ Accordion Example Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/accordion A common use case for accordions is to create a FAQ section. This example uses Collapsible="true" to allow all items to be closed. ```html How do I reset my password? Click on 'Forgot Password' on the login page... What payment methods do you accept? We accept all major credit cards... ``` -------------------------------- ### Basic Dialog Example Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/dialog A simple dialog with a title, description, and action buttons. Use the @bind-Open attribute to control visibility. ```razor Are you sure? This action cannot be undone. ``` -------------------------------- ### Basic Popover Example Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/popover Use this snippet to display a popover with predefined content when a button is clicked. Ensure the Button and Popover components are correctly imported. ```razor

Dimensions

Set the dimensions for the layer.

``` -------------------------------- ### Badge Usage Examples Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/badge Illustrates how to use the Badge component to annotate statuses or counts within a UI. Different variants can be applied based on the context. ```html
Status: Active
Notifications: 5
Version: v1.0.0
``` -------------------------------- ### Button Sizes Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/button Illustrates how to adjust the size of the Button component using the Size property. Includes an example for icon-only buttons. ```html ``` -------------------------------- ### Input Group with Inline Start Addon Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/input-group Use Align="InputGroupAlign.InlineStart" to position the addon before the input. This is the default behavior. ```razor ... ``` -------------------------------- ### Basic Accordion Example Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/accordion A basic accordion where only one item can be open at a time. The first item is open by default. ```html Is it accessible? Yes. It adheres to the WAI-ARIA design pattern. Is it styled? Yes. It comes with default styles that match the other components. Is it animated? Yes. It's animated by default, but you can disable it if you prefer. ``` -------------------------------- ### Calendar with Preselected Date Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/calendar Initialize the calendar with a specific date already selected. This example preselects today's date. ```razor @code { private DateTime? selectedDate = DateTime.Today; } ``` -------------------------------- ### Textarea Input Group with Block Start Addon Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/input-group Use block-start alignment to position addons, such as icons and descriptive text, above the textarea. ```razor ... Comment ``` -------------------------------- ### Input Group with Static Text Addons Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/input-group Display static text like currency symbols or prefixes using InputGroupText within addons. Shows examples for currency and username inputs. ```razor $ .00 @@ ``` -------------------------------- ### Basic Toast Notification Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/sonner Trigger a basic toast notification using the injected `ISonnerService`. This example shows how to display a default toast with a title and description, and a destructive toast. ```csharp @inject ISonnerService SonnerService @code { private void ShowDefault(MouseEventArgs _) { SonnerService.Show("Scheduled", "Friday, February 10 at 5:57 PM."); } private void ShowDestructive(MouseEventArgs _) { SonnerService.Show("Uh oh!", "Something went wrong.", SonnerToastVariant.Destructive); } } ``` -------------------------------- ### Switch in a Settings Form Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/switch Integrate the Switch component within a settings form to manage user preferences. This example shows how to associate a label and descriptive text with the switch. ```razor

Receive emails about new products.

``` -------------------------------- ### Card for Notifications Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/card An example of using cards to group related notification items. Each notification includes a status indicator, title, and timestamp. ```html Notifications You have 3 unread messages.

Your call has been confirmed.

1 hour ago

You have a new message!

2 hours ago

``` -------------------------------- ### Button Loading State Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/button Shows how to display a loading spinner within a button using the IsLoading property. The second example demonstrates dynamic text and state management. ```html ``` -------------------------------- ### Configure Max Visible Toasts Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/sonner Control the maximum number of fully visible toasts before they start stacking using the `MaxVisible` parameter. The default is 3, with a minimum of 1. ```csharp @* Show up to 5 toasts fully before stacking begins. *@ @* Default is 3. Minimum 1. *@ ``` -------------------------------- ### Internal Navigation Links Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/link Provides examples of using the Link component for internal navigation between pages within the application. Different variants can be applied for visual distinction. ```razor View Button View Card Installation ``` -------------------------------- ### Form Dialog Example Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/dialog A dialog designed to contain a form for user input. Wrap form elements within DialogBody. The 'max-w-[425px]' class sets a maximum width. ```razor Edit profile Make changes to your profile here.
``` -------------------------------- ### Controlled Popover State Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/popover This example demonstrates how to control the popover's visibility programmatically using a boolean variable bound to the @bind-Open directive. This is useful for managing the popover's state based on application logic. ```razor @code { private bool popoverOpen; }

This is a controlled popover.

``` -------------------------------- ### Basic Command Menu Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/command Implement a basic command menu with search functionality, grouped suggestions, and actions. Includes shortcuts and disabled items. ```html No results found. Calendar Search Settings Profile ⌘P Billing ⌘B Team ``` -------------------------------- ### Disabled Button Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/button Provides examples of how to disable a button to prevent user interaction. This can be applied to default and outlined variants. ```html ``` -------------------------------- ### Basic Tooltip Implementation Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/tooltip Demonstrates the fundamental usage of the Tooltip component. Use this for simple information popups triggered by hovering over a button. ```Razor

Add to library

``` -------------------------------- ### Input Group with Addons on Both Sides Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/input-group Combine InlineStart and InlineEnd addons on the same input for prefix and suffix elements like icons and buttons. ```razor ... ... Copy ``` -------------------------------- ### Basic Skeleton Shapes Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/skeleton Demonstrates the basic usage of the Skeleton component with different dimensions. ```html ``` -------------------------------- ### Disabled Checkbox Example Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/checkbox This snippet demonstrates how to render a disabled checkbox. The 'Disabled' property set to 'true' prevents user interaction. ```razor ``` -------------------------------- ### Add ShadCn.Blazor Using Statements Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/installation Include these using statements in your _Imports.razor file to easily access ShadCn.Blazor components and their namespaces. ```razor @using ShadCn.Blazor.Components @using ShadCn.Blazor.Components.Alert @using ShadCn.Blazor.Components.Badge @using ShadCn.Blazor.Components.Button @using ShadCn.Blazor.Components.Card @using ShadCn.Blazor.Components.Input @using ShadCn.Blazor.Components.Separator ``` -------------------------------- ### Dropdown Menu Alignment Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/dropdown-menu Control the positioning of the dropdown menu content using the Align parameter on DropdownMenuContent. Options include Start and End. ```razor Item 1 Item 1 ``` -------------------------------- ### Register ShadCn.Blazor Services Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/installation Register the necessary services for ShadCn.Blazor components in your application's Program.cs file. ```csharp builder.Services.AddShadCnBlazorComponents(); ``` -------------------------------- ### Card Loading Skeleton Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/skeleton Shows how to use Skeleton components to create a placeholder for a card's content, including an avatar and text lines. ```html
``` -------------------------------- ### Sheet Side Direction Control Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/sheet Demonstrates how to control the direction from which the Sheet slides in using the 'Side' property. This example iterates through all available 'SheetSide' enum values. ```razor @foreach (var side in Enum.GetValues()) { @side Sheet This sheet slides in from the @side.

Content goes here.

} ``` -------------------------------- ### Basic Item Usage Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/item A simple Item with a title and description. Use this for straightforward content display. ```html Notifications Manage your notification preferences. ``` -------------------------------- ### Default Menubar Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/menubar A standard menubar with File, Edit, View, and Help menus. Use MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarItem, MenubarSeparator, and MenubarShortcut for structure and shortcuts. ```html File New Tab ⌘T New Window ⌘N New Incognito Window Share Print Edit Undo ⌘Z Redo ⇧⌘Z Cut ⌘X Copy ⌘C Paste ⌘V ``` -------------------------------- ### Basic Sidebar Structure Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/sidebar Demonstrates the fundamental structure of the Sidebar component with header, content, and menu items. Use this for standard navigation layouts. ```html My App Platform Dashboard Analytics Settings Profile ``` -------------------------------- ### Basic Sidebar with Navigation Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/sidebar A standard sidebar implementation featuring navigation links with icons and text. Use this for primary site navigation. ```html Acme Inc 🏠 Dashboard 👤 Users
v1.0.0
``` -------------------------------- ### Calendar with Date Range Constraints Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/calendar Restrict the selectable date range by setting minimum and maximum dates. This example allows selection from today up to 30 days in the future. ```razor @code { private DateTime? selectedDate; } ``` -------------------------------- ### Basic Progress Bar Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/progress Use this to display a static progress value. Set the 'Value' attribute to represent the completion percentage. ```html ``` -------------------------------- ### Basic Table Structure Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/table A simple table with a header, body, and caption. Use this for displaying tabular data with a clear title. ```html A list of your recent invoices. Invoice Status Method Amount INV001 Paid Credit Card $250.00
``` -------------------------------- ### Add Theme CSS to HTML Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/installation Include the ShadCn.Blazor theme stylesheet in your main HTML file to apply default styling. ```html ``` -------------------------------- ### Radial Chart with Center Text (Gauge) Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/charts/radial Implement a progress indicator or gauge by using a single data item and the CenterContent slot. This allows displaying custom text, like a percentage, in the center of the radial chart. Configure start and end angles for specific gauge ranges. ```csharp // For gauge/progress, use a single data item with CenterContent. var gaugeConfig = new ChartConfig { ["progress"] = new ChartConfigEntry { Label = "Progress", Color = "hsl(var(--chart-1))" } }; var gaugeData = new List> { new() { ["name"] = "progress", ["value"] = 75, ["fill"] = "var(--color-progress)" } };
75% Complete
``` -------------------------------- ### Dialog Size Variations Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/dialog Illustrates how to control the width of the dialog content using the Size parameter. Available sizes range from 'Sm' to 'Full'. ```razor @* Small *@ ... @* Default (max-w-lg) *@ ... @* Extra Large *@ ... @* 3XL *@ ... @* Fullscreen *@ ... @* Available sizes: Sm, Md, Lg, Xl, Max2xl, Max3xl, Max4xl, Max5xl, Max6xl, Max7xl, Full *@ ``` -------------------------------- ### Basic Dropdown Menu Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/dropdown-menu A standard dropdown menu with labels, items, and separators. Use this for a simple list of actions. ```razor My Account Profile Billing Settings Log out ``` -------------------------------- ### Open Dialog with Strongly-Typed Result Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/dialog-service Inject `IDialogService` and use `ShowAsync` to open a dialog with specific content, result, and input types. The result can be checked for success and accessed. ```csharp @inject IDialogService DialogService @code { private async Task OpenDialog() { var input = new UserProfile { Name = "John Doe", Username = "johndoe" }; var result = await DialogService.ShowAsync( input, new DialogOptions { Dismissable = true } ); if (result.Success) { Console.WriteLine($"Updated: {result.UpdatedProfile.Name}"); } } } ``` -------------------------------- ### External Link Configuration Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/link Shows how to configure an external Link to open in a new tab using the target="_blank" and rel="noopener noreferrer" attributes. ```razor GitHub ↗ ``` -------------------------------- ### Control Dialog Size with DialogOptions Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/dialog-service Use `DialogOptions.Size` to specify the width of the dialog when opening it via the service. Various predefined sizes are available, from `Sm` to `Full` (fullscreen). ```csharp var result = await DialogService.ShowAsync( input, new DialogOptions { Size = DialogSize.Xl, // Extra large Dismissable = true } ); // Available sizes: // DialogSize.Sm - max-w-sm // DialogSize.Md - max-w-md // DialogSize.Default - max-w-lg (default) // DialogSize.Lg - max-w-lg // DialogSize.Xl - max-w-xl // DialogSize.Max2xl - max-w-2xl // DialogSize.Max3xl - max-w-3xl // DialogSize.Max4xl - max-w-4xl // DialogSize.Max5xl - max-w-5xl // DialogSize.Max6xl - max-w-6xl // DialogSize.Max7xl - max-w-7xl // DialogSize.Full - fullscreen ``` -------------------------------- ### Menubar with Submenu Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/menubar Create nested menus using MenubarSub, MenubarSubTrigger, and MenubarSubContent. This allows for hierarchical menu structures. ```html File New File Open File Share Email Link Messages Airdrop Print ``` -------------------------------- ### Dropdown Menu with Shortcuts Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/dropdown-menu Add `DropdownMenuShortcut` to display keyboard hints alongside menu items for actions like Undo, Cut, Copy, and Paste. ```razor Edit Undo ⌘Z Cut ⌘X Copy ⌘C Paste ⌘V ``` -------------------------------- ### Basic Avatar Usage Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/avatar Renders an avatar with an image source and an alternative text. Includes a fallback option with initials if the image fails to load. ```html ``` -------------------------------- ### Basic Sheet Implementation Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/sheet A standard implementation of the Sheet component that slides in from the right. It includes a trigger button, content header, body, and footer with action buttons. ```razor Edit profile Make changes to your profile here.
``` -------------------------------- ### Link Sizes Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/link Illustrates how to adjust the size of the Link component using the Size property, with options for Small, Default, and Large. ```razor Small Default Large ``` -------------------------------- ### Default Card Structure Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/card A basic card with a title, description, content, and an action button. Use this for general content display. ```html Card Title Card Description

Card Content

``` -------------------------------- ### Open Edit Profile Sheet with SheetService Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/sheet-service Shows how to use the SheetService to open a specific sheet for editing a profile. It demonstrates passing input data and handling the result. ```csharp @inject ISheetService SheetService @code { private async Task OpenSheet() { var input = new EditProfileModel { Name = "John Doe", Username = "johndoe" }; var result = await SheetService.ShowAsync( input, new SheetOptions { Side = SheetSide.Right } ); if (result != null) { Console.WriteLine($"Updated: {result.Name}"); } } } ``` -------------------------------- ### Item with Actions Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/item Includes interactive actions, such as buttons, on the right side of the item. Ideal for items requiring user interaction. ```html Settings Configure your application settings. ``` -------------------------------- ### Small Text Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/typography Use the tag for fine print and labels. ```html Email address ``` -------------------------------- ### Item Sizes Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/item Controls the density and spacing of the Item component using the Size parameter. Select 'Default' for standard spacing or 'Sm' for a more compact layout. ```html Default size Standard padding and gaps. ``` ```html Small size Compact padding and gaps. ``` -------------------------------- ### Tooltip with Custom Delay Configuration Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/tooltip Shows how to control the delay before a tooltip appears. Configure 'DelayDuration' to 0 for immediate display or to a specific millisecond value for a delayed appearance. ```Razor

Shows immediately

1 second delay

``` -------------------------------- ### Default Bar Chart Configuration Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/charts/bar Configure a basic bar chart with two data series (desktop and mobile) and animate bars on first render. Requires ChartContainer, BarChart, CartesianGrid, XAxis, Bar, and ChartTooltip components. ```csharp // Config — two series var config = new ChartConfig { ["desktop"] = new ChartConfigEntry { Label = "Desktop", Color = "hsl(var(--chart-1))" }, ["mobile"] = new ChartConfigEntry { Label = "Mobile", Color = "hsl(var(--chart-2))" } }; ``` -------------------------------- ### Input Group with Keyboard Shortcut (Kbd) Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/input-group Show keyboard shortcuts inside the input group using a `kbd` element within an addon. ```razor ... ⌘K ``` -------------------------------- ### Default Pie Chart Configuration and Data Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/charts/pie Configure pie chart colors and data. The config maps category names to colors, and data requires a 'fill' property pointing to the color variable. ```csharp var config = new ChartConfig { ["chrome"] = new ChartConfigEntry { Label = "Chrome", Color = "hsl(var(--chart-1))" }, ["safari"] = new ChartConfigEntry { Label = "Safari", Color = "hsl(var(--chart-2))" }, ["firefox"] = new ChartConfigEntry { Label = "Firefox", Color = "hsl(var(--chart-3))" }, ["edge"] = new ChartConfigEntry { Label = "Edge", Color = "hsl(var(--chart-4))" }, ["other"] = new ChartConfigEntry { Label = "Other", Color = "hsl(var(--chart-5))" } }; var pieData = new List> { new() { ["browser"] = "chrome", ["visitors"] = 275, ["fill"] = "var(--color-chrome)" }, new() { ["browser"] = "safari", ["visitors"] = 200, ["fill"] = "var(--color-safari)" }, new() { ["browser"] = "firefox", ["visitors"] = 187, ["fill"] = "var(--color-firefox)" }, new() { ["browser"] = "edge", ["visitors"] = 173, ["fill"] = "var(--color-edge)" }, new() { ["browser"] = "other", ["visitors"] = 90, ["fill"] = "var(--color-other)" }, }; // Pie slices animate in with a scale effect. ``` -------------------------------- ### Dropdown Menu with Icons and Shortcuts Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/dropdown-menu Enhance dropdown items with inline SVG icons for visual context and `DropdownMenuShortcut` to display keyboard hints. ```razor My Account Profile ⇧⌘P Billing ⌘B Settings ⌘S Log out ⇧⌘Q ``` -------------------------------- ### Open Stacked Dialogs from within a Dialog Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/dialog-service Dialog components can inject `IDialogService` to open new dialogs, creating stacked dialogs. Each new dialog stacks on top, and closing the topmost reveals the one beneath. ```csharp // The dialog component can inject IDialogService and open new dialogs: @inject IDialogService DialogService Dialog Level @Data.Level

Dialog content...

@code { [Parameter] public NestedDialogModel Data { get; set; } = new(); [CascadingParameter] public DialogContext Dialog { get; set; } = default!; @inject IDialogService DialogService private async Task OpenNested() { var input = new NestedDialogModel { Level = Data.Level + 1 }; var result = await DialogService .ShowAsync(input); } } ``` -------------------------------- ### Default Alert Source: https://shadcnblazordocs.ashymoss-4232cb31.swedencentral.azurecontainerapps.io/components/alert A basic alert with a title and description. Use for general information. ```razor Heads up! You can add components to your app using the CLI. ```