Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

Components

izzy add component puts a component's example from these docs on a page in your app, with the sample data and code it needs. izzy also lists every component and its options, in the terminal or as JSON.

Add a component's example

Run izzy add component in your app's folder with the component's name, and set --at to the file and line where it goes:

bash
izzy add component Select --at Components/Pages/Signup.razor:12

izzy adds the component's usage example, the first one on its docs page. The example's markup goes at the line. Its @using lines go at the top of the page, and its fields, methods and classes go into the page's @code block.

When the page already has a name the example uses, such as Model or a form's name, the example's gets a number: Model2. When both override the same method, such as OnInitialized, izzy adds the example's as a method of its own and tells you to call it.

Choose another example

To add another of the component's examples, set --example to its name. To list the names, run izzy describe component:

bash
izzy describe component DataGrid
izzy add component DataGrid --example editing --at Components/Pages/Orders.razor:8

An example that keeps its sample data in a file of its own, as the grid's orders are, gets that file beside your page.

Add the tag alone

To add only the component's tag, with its required options left empty, set --tag. Add a column after the line to put it inside the line:

bash
izzy add component QrCode --tag --at Components/Pages/Ticket.razor:20:9

List and describe components

izzy list component lists the components with what each one does. izzy describe component Button lists a component's options with their types and defaults, its content, its events and its examples. In an app you've restored, izzy describes the version of IzzyBlazor the app references: the data comes from the app's own IzzyBlazor.Core package. Outside an app, or in an app on a version before 0.1.0-alpha.26, it describes the version this izzy came with and says so.

With --json, each component has a picture: its first example as its docs page draws it, 720 pixels wide, in the light and the dark scheme.

For editors

An editor's side panel is built on four commands. Each answers with JSON when you add --json. The last three read the page from standard input with --stdin, so they work on a file you haven't saved.

Commands for an editor
CommandWhat it doesNeeds
izzy describe component --all --jsonEvery component and part with its options as a JSON Schema.Nothing
izzy add component <Name> --tag --at <file>:<line>:<col>The edit that inserts the tag at the cursor.Nothing
izzy inspect <file>:<line>:<col>The component at the cursor and what each of its attributes says.A free account
izzy set <file>:<line>:<col> --<option> <value>The edit that sets an option, or removes it with --unset.A free account

izzy set writes a value as Razor does for the option's type: Variant="ButtonVariant.Outline" for an enum, a bare Disabled for a switch. A value on the page that is an expression, such as Size="@_size", is reported as one and stays as it is until you set another.

Connection lost

Rejoining the server…