Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

Blocks

A block is a ready-made section of a page, such as a hero, pricing or a sign-up form. izzy add adds the block's component to your app and places it on a page. To browse them, see Blocks, where each one has a live preview and its settings.

Add a block

Run izzy add in your app's folder with the block's name. Add its settings as options:

bash
izzy add block hero --layout Split

izzy puts the block's component in Components/Blocks and adds the block to a page. Most blocks go at the end of Home.razor. A footer goes in the layout.

Choose where it goes

To add the block to another page, set --into. To add it at a specific line, set --at with the file and line number.

Some items are recipes, such as an empty state. A recipe has no usual place on a page, so you always choose the line:

bash
izzy add block empty-state --at Components/Pages/Orders.razor:24

Settings

To list a block's settings, run izzy describe block with its id, such as izzy describe block hero. The settings have the same names as the starter's options in dotnet new, so you can use the same spelling in both.

Apps with WebAssembly or Auto pages

When your pages are in a .Client project, izzy adds blocks there too. Code that reads the request, such as the cookie notice's, stays in the server project.

Connection lost

Rejoining the server…