Getting started
Hand-written guide — fill in with install steps and a first-preview walkthrough.
Install the authoring package into a Razor class library that references the project holding your components:
dotnet add package BlazorToolkit.Previews
Then declare a preview by inheriting ComponentPreview<T>:
public class CounterPreviews : ComponentPreview<Counter>
{
public CounterPreviews()
{
AddPreview("Default");
AddPreview("Starts at 5").WithParameter(c => c.InitialCount, 5);
}
}
See the API reference for the full set of builder verbs.