본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)40k · #7205

fluentui-blazor

하는 일

이 가이드는 애플리케이션에서 Fluent UI Blazor 구성 요소 라이브러리를 사용하는 방법을 가르칩니다. 설정 방법, 버튼과 메뉴 같은 구성 요소 추가, 대화 상자와 알림 같은 기능 사용법을 보여 줍니다.

사용하는 경우

  • ✓현대적인 시각적 구성 요소로 Blazor 앱을 만들 때.
  • ✓버튼, 메뉴, 텍스트 필드, 대화형 표를 추가해야 할 때.
  • ✓사용자에게 메시지, 대화 상자, 알림을 보여 주고 싶을 때.

스킬 링크

https://github.com/github/awesome-copilot/blob/main/skills/fluentui-blazor/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/fluentui-blazor/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Fluent UI를 사용해 Blazor 페이지에 클릭할 수 있는 버튼을 어떻게 추가하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

라이브러리는 자동으로 설정됩니다. 주 레이아웃에 몇 가지 'provider'를 추가하고, 프로젝트의 시작 코드에 라이브러리를 등록하기만 하면 됩니다. 그 뒤에는 구성 요소를 코드에서 바로 쓸 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Fluent UI Blazor — Consumer Usage Guide

This skill teaches how to correctly use the Microsoft.FluentUI.AspNetCore.Components (version 4) NuGet package in Blazor applications.

Critical Rules

1. No manual <script> or <link> tags needed

The library auto-loads all CSS and JS via Blazor's static web assets and JS initializers. Never tell users to add <script> or <link> tags for the core library.

2. Providers are mandatory for service-based components

These provider components MUST be added to the root layout (e.g. MainLayout.razor) for their corresponding services to work. Without them, service calls fail silently (no error, no UI).

<FluentToastProvider />
<FluentDialogProvider />
<FluentMessageBarProvider />
<FluentTooltipProvider />
<FluentKeyCodeProvider />

3. Service registration in Program.cs

builder.Services.AddFluentUIComponents();

// Or with configuration:
builder.Services.AddFluentUIComponents(options =>
{
    options.UseTooltipServiceProvider = true;  // default: true
    options.ServiceLifetime = ServiceLifetime.Scoped; // default
});

ServiceLifetime rules:

  • ServiceLifetime.Scoped — for Blazor Server / Interactive (default)
  • ServiceLifetime.Singleton — for Blazor WebAssembly standalone
  • ServiceLifetime.Transient — throws NotSupportedException

4. Icons require a separate NuGet package

dotnet add package Microsoft.FluentUI.AspNetCore.Components.Icons

Usage with a @using alias:

@using Icons = Microsoft.FluentUI.AspNetCore.Components.Icons

<FluentIcon Value="@(Icons.Regular.Size24.Save)" />
<FluentIcon Value="@(Icons.Filled.Size20.Delete)" Color="@Color.Error" />

Pattern: Icons.[Variant].[Size].[Name]

  • Variants: Regular, Filled
  • Sizes: Size12, Size16, Size20, Size24, Size28, Size32, Size48

Custom image: Icon.FromImageUrl("/path/to/image.png")

Never use string-based icon names — icons are strongly-typed classes.

5. List component binding model

FluentSelect<TOption>, FluentCombobox<TOption>, FluentListbox<TOption>, and FluentAutocomplete<TOption> do NOT work like <InputSelect>. They use:

  • Items — the data source (IEnumerable<TOption>)
  • OptionText — Func<TOption, string?> to extract display text
  • OptionValue — Func<TOption, string?> to extract the value string
  • SelectedOption / SelectedOptionChanged — for single selection binding
  • SelectedOptions / SelectedOptionsChanged — for multi-selection binding
<FluentSelect Items="@countries"
              OptionText="@(c => c.Name)"
              OptionValue="@(c => c.Code)"
              @bind-SelectedOption="@selectedCountry"
              Label="Country" />

NOT like this (wrong pattern):

@* WRONG — do not use InputSelect pattern *@
<FluentSelect @bind-Value="@selectedValue">
    <option value="1">One</option>
</FluentSelect>

6. FluentAutocomplete specifics

  • Use ValueText (NOT Value — it's obsolete) for the search input text
  • OnOptionsSearch is the required callback to filter options
  • Default is Multiple="true"
<FluentAutocomplete TOption="Person"
                    OnOptionsSearch="@OnSearch"
                    OptionText="@(p => p.FullName)"
                    @bind-SelectedOptions="@selectedPeople"
                    Label="Search people" />

@code {
    private void OnSearch(OptionsSearchEventArgs<Person> args)
    {
        args.Items = allPeople.Where(p =>
            p.FullName.Contains(args.Text, StringComparison.OrdinalIgnoreCase));
    }
}

7. Dialog service pattern

Do NOT toggle visibility of <FluentDialog> tags. The service pattern is:

  1. Create a content component implementing IDialogContentComponent<TData>:
public partial class EditPersonDialog : IDialogContentComponent<Person>
{
    [Parameter] public Person Content { get; set; } = default!;

    [CascadingParameter] public FluentDialog Dialog { get; set; } = default!;

    private async Task SaveAsync()
    {
        await Dialog.CloseAsync(Content);
    }

    private async Task CancelAsync()
    {
        await Dialog.CancelAsync();
    }
}
  1. Show the dialog via IDialogService:
[Inject] private IDialogService DialogService { get; set; } = default!;

private async Task ShowEditDialog()
{
    var dialog = await DialogService.ShowDialogAsync<EditPersonDialog, Person>(
        person,

…
자주 묻는 질문

CSS나 JavaScript 파일을 직접 추가해야 하나요?

아니요. 라이브러리가 모든 것을 자동으로 불러옵니다. 핵심 라이브러리에 대해 수동으로 `<script>`나 `<link>` 태그를 추가하지 마세요.

대화 상자나 알림이 작동하지 않는 이유는 무엇인가요?

올바르게 작동하도록 주 레이아웃(`MainLayout.razor`)에 `<FluentDialogProvider />` 같은 'Provider' 구성 요소를 추가해야 합니다.

아이콘은 어떻게 사용하나요?

추가 NuGet 패키지(`Microsoft.FluentUI.AspNetCore.Components.Icons`)를 설치하고, `Icons.Regular.Size24.Save`처럼 아이콘 클래스를 코드에서 직접 사용해야 합니다.

상세 정보

작성자의 원본 설명

Guide for using the Microsoft Fluent UI Blazor component library (Microsoft.FluentUI.AspNetCore.Components NuGet package) in Blazor applications. Use this when the user is building a Blazor app with Fluent UI components, setting up the library, using FluentUI components like FluentButton, FluentDataGrid, FluentDialog, FluentToast, FluentNavMenu, FluentTextField, FluentSelect, FluentAutocomplete, F

repo: github/awesome-copilot

인기도

GitHub 스타
40k
순위
#7205
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬