Pglet is a rich User Interface (UI) framework to quickly build interactive web apps in .NET without prior knowledge of web technologies like HTTP, HTML, CSS or JavaSscript. You build UI with controls which use Fluent UI React to ensure your programs look cool and professional.
- .NET Framework 4.6.1 or above
- .NET Core 5 or above on Windows, Linux or macOS
Create a new console application:
mkdir hello-world
cd hello-world
dotnet new console
Add Pglet package to your project:
dotnet add package Pglet
Update Program.cs with:
using Pglet;
var page = await PgletClient.ConnectPage();
await page.AddAsync(new Text { Value = "Hello, world!" });Run the app:
dotnet run
A new browser window will popup:
Here is a local page served by an instance of Pglet server started in the background on your computer.
Add web: true parameter to ConnectPage() call:
using Pglet;
var page = await PgletClient.ConnectPage(web: true);
await page.AddAsync(new Text { Value = "Hello, world!" });This time page will be created on Pglet hosted service.
