formaui-net.Framework.Input.Interop
1.0.0-preview.27
Prefix Reserved
dotnet add package formaui-net.Framework.Input.Interop --version 1.0.0-preview.27
NuGet\Install-Package formaui-net.Framework.Input.Interop -Version 1.0.0-preview.27
<PackageReference Include="formaui-net.Framework.Input.Interop" Version="1.0.0-preview.27" />
<PackageVersion Include="formaui-net.Framework.Input.Interop" Version="1.0.0-preview.27" />
<PackageReference Include="formaui-net.Framework.Input.Interop" />
paket add formaui-net.Framework.Input.Interop --version 1.0.0-preview.27
#r "nuget: formaui-net.Framework.Input.Interop, 1.0.0-preview.27"
#:package formaui-net.Framework.Input.Interop@1.0.0-preview.27
#addin nuget:?package=formaui-net.Framework.Input.Interop&version=1.0.0-preview.27&prerelease
#tool nuget:?package=formaui-net.Framework.Input.Interop&version=1.0.0-preview.27&prerelease
Forma.Framework.Input.Interop
The input router: the script that resolves every key, press, wheel turn and drop on the page to one
owner, and the C# a component registers its elements through. It carries the policy and routes
described in Forma.Framework.Input to each circuit's document and delivers the actions and
dismissals it resolves back to their owners.
The package comes with formaui-net.Blazor, and AddFormaUIServices registers the router through
AddFormaInputRouter(options): the policy as a singleton InputRouterOptions and InputRouter as a
scoped service, one per user scope, a circuit or a WebAssembly runtime. Its scripts are served from _content/forma/input/scripts/.
Registering a component's element
A component injects InputRouter, keeps an InputRegistration for the element it owns, syncs it
after every render and disposes it with the component. A search box that runs its search on Enter:
using Forma.Framework.Input;
using Forma.Framework.Input.Interop;
using Forma.Framework.Input.Keyboard;
public sealed partial class FormaSearchBox : FormaElementBase
{
private const string SearchAction = "search-box.search";
private static readonly InputProfile SearchProfile = new()
{
InputRoutes = [new InputRoute(SearchAction, new KeyBinding("Enter"))],
};
private InputRegistration _inputRegistration = default!;
[Inject] private InputRouter InputRouter { get; set; } = default!;
protected override void OnInitialized()
=> _inputRegistration = new InputRegistration(InputRouter, Context.JS, HandleActionAsync);
protected override Task OnAfterRenderAsync(bool firstRender)
=> _inputRegistration.SyncAsync(RootElement, SearchProfile);
private Task HandleActionAsync(string action, InputInfo input)
=> action == SearchAction ? SearchAsync() : Task.CompletedTask;
protected override async ValueTask DisposeAsyncCore()
{
await _inputRegistration.DisposeAsync();
await base.DisposeAsyncCore();
}
}
A surface that opens and closes passes its state on each sync, so the element is registered and held foremost only while it is open:
await _inputRegistration.SyncAsync(RootElement, _inputProfile, wanted: IsOpen, active: IsOpen, within: [_trigger]);
Markup that needs routes around content it renders composes FormaInputScope, a component that
registers its own element the same way.
The surface
| Member | What it is |
|---|---|
InputRegistration(router, js, onAction, onDismiss) |
A registration a component holds on one of its elements, performing actions and dismissals through the functions it is given, and logging what it refuses of what the browser sends under the component's environment, js. |
InputRegistration.SyncAsync(element, profile, wanted, active, parent, within) |
Brings the registration in step: the element registered with the profile while wanted, held foremost while active, inside parent, with the within elements, such as the trigger that opened it, counted as inside it. |
InputRegistration.IsRegistered, IsActive |
Whether the element is registered, and whether it is held active. |
InputRouter.RegisterAsync(element, profile, owner, parent, within) |
Registers an element directly and returns its InputScope, whose ActivateAsync, ReleaseAsync, UpdateAsync(profile) and DisposeAsync drive it by hand. |
InputInspector.AttachAsync(element, owner) |
A behavior built from Context.JS that reports how the router resolves each key, press and wheel turn to the owner's ReportAsync, for a debugging surface. |
License
Apache License 2.0, under the repository's LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- formaui-net.Framework.Input (= 1.0.0-preview.27)
- formaui-net.Framework.JavaScript.Interop (= 1.0.0-preview.27)
- Microsoft.AspNetCore.Components (>= 11.0.0)
- Microsoft.Extensions.Logging (>= 11.0.0)
- Microsoft.JSInterop (>= 11.0.0)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on formaui-net.Framework.Input.Interop:
| Package | Downloads |
|---|---|
|
formaui-net.Framework.Browser.Interop
The browser capabilities Forma's components reach through JavaScript. |
|
|
formaui-net.Blazor
A Blazor component library for .NET 11: form inputs and pickers, dialogs, popovers and toasts, toolbars and menus, tabs and layout, file pickers, uploaders and viewers, icons, emoji and windows. |
|
|
formaui-net.Blazor.Explorer
FormaExplorer, a file manager for the Forma component library over items and folders the host already holds: a folder tree, an address bar with history and breadcrumbs, thumbnail, details and list views, search, sorting and grouping, selection, drag and drop between folders, upload, and a preview of any item. |
|
|
formaui-net.Blazor.DataView
FormaDataView, the collection component of the Forma component library. |
|
|
formaui-net.Blazor.Composer
FormaComposer, a rich text authoring surface for Blazor: an editor with the toolbar, dialogs, views and attachments an article or a page body needs, assembled from plugins the host picks. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-preview.27 | 63 | 12/3/2026 |
| 1.0.0-preview.26 | 69 | 12/3/2026 |
| 1.0.0-preview.25 | 78 | 12/2/2026 |
| 1.0.0-preview.24 | 93 | 12/1/2026 |
| 1.0.0-preview.23 | 126 | 11/30/2026 |
| 1.0.0-preview.22 | 135 | 11/30/2026 |
| 1.0.0-preview.21 | 131 | 11/29/2026 |
| 1.0.0-preview.20 | 136 | 11/26/2026 |
| 1.0.0-preview.19 | 134 | 11/26/2026 |
| 1.0.0-preview.18 | 129 | 11/26/2026 |
| 1.0.0-preview.17 | 121 | 11/26/2026 |
| 1.0.0-preview.16 | 114 | 11/24/2026 |
| 1.0.0-preview.15 | 113 | 11/23/2026 |
| 1.0.0-preview.14 | 117 | 11/23/2026 |
| 1.0.0-preview.13 | 113 | 11/21/2026 |
| 1.0.0-preview.12 | 111 | 11/20/2026 |
| 1.0.0-preview.11 | 115 | 11/18/2026 |
| 1.0.0-preview.10 | 114 | 11/17/2026 |
| 1.0.0-preview.9 | 149 | 11/17/2026 |
| 1.0.0-preview.8 | 127 | 11/17/2026 |
What this release changed is in Forma's changelog: https://github.com/FormaUI/Forma/blob/v1.0.0-preview.27/CHANGELOG.md