Custom Components Not Displaying

Hi
I have built a custom Blazor component in Blazor Studio and placed it into one of the main pages of my app but for the life of me cannot get it to show up, it just shows as an empty box "placeholder".

I have even tried to totally just strip it down to ui elements and yet cannot get it to either show in the IDE or even show when running the app.
This is for a webassembly Blazor app.

Is there a special way to create my own custom components and have them display?
The simplest version that still doesn't show is:

<RadzenStack JustifyContent="Radzen.JustifyContent.SpaceEvenly" AlignItems="Radzen.AlignItems.Center" Style="display: flex; padding-top: 10px" Gap="5">
    <RadzenImage Style="width: 70px; height: 70px" Path="images\menu_gallery.png"></RadzenImage>
    <RadzenText Text="Gallery" TextAlign="Radzen.TextAlign.Center" Style="color: var(--rz-white)" />
</RadzenStack>

NOTE: If I put this straight into the page itsef, it is fine show up, but I would rather have it as a reusable custom component.

Can you provide more info where exactly you’ve placed your custom component? There isn’t anything special when working with custom components.

I just tested with a vanilla Blazor application created with dotnet new blazorserver. It shows a shared component by default - the SurveyPrompt.

Here is how it looks in Radzen Blazor Studio:
shared-components

Hi @enchev and @korchev

Thanks for the very speedy replies.
I must have mucked something up, I will create a new Blazor Studio project and try again with no other changes.
Quite possibly I have done something unexpected as I was previously used to just working in VS2022.

I will loop back around here with the result.

Thanks again :slight_smile:

ahhh, @korchev I just noticed your custom component was in "Shared".
Is this a requirement?
I had added mine to a new folder called "Components" under the client project root?

The only requirement is to have the namespace imported e.g. YourApp.Components. This is how Blazor works - directories are used for namespaces. The Shared namespace is imported by default in _Imports.razor

@korchev thanks so much for pointing me in the right direction, that was the issue.
I had assumed that when dragging a custom component to the designer it would add the required namespace automatically. I was looking for far more unusal reasons for it not showing instead of looking for the basics first.

A rookie mistake as I am not used to the visual designer part yet (but think it it truly fantastic).

Thanks again for your help!