DRYL COMPONENTS
Color mode: System — switch to light
2.20.1
Get Started

Add DRYL to your app

DRYL is a single NuGet package with zero JavaScript dependencies. Add the package, register the services, reference the stylesheet and script, and you are ready to go.

1 · Install the package

bash
dotnet add package DRYL.Components

2 · Register the services

In Program.cs, register the DRYL services alongside Razor components.

csharp
using DRYL.Components;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddRazorComponents()
    .AddInteractiveServerComponents();

// Register DRYL services (dialogs, toasts, …)
builder.Services.AddDrylComponents();

3 · Reference the assets

Add the stylesheet to the <head> and the script before the closing </body> of your host page (App.razor or _Host.cshtml).

html
<head>
    <!-- … -->
    <link rel="stylesheet" href="_content/DRYL.Components/dryl.css" />
</head>
<body>
    <!-- … -->
    <script src="_content/DRYL.Components/js/dryl.js"></script>
</body>

4 · Import the namespace

Add a using to _Imports.razor so the components are in scope everywhere.

csharp
@using DRYL.Components

5 · Use a component

That's it — drop a component into any page. Switch to the Code tab to see the markup.

Ready
An unhandled error has occurred. Reload x

Reconnecting to the server…

Attempt /

Next try in s