Creating custom components
Write a component and register it in a module.
Read the guideTech stack · rendering
Veva is an ASP.NET Core app with one Blazor router. Every page renders on the server in one of three ways: prerendered and then interactive, interactive from the start, or as static HTML. The components are standard Blazor components with a few attributes added.
The stack
The same .NET, ASP.NET Core and Blazor you already use, with Veva's modules on top.
Veva and its modules target net10.0. One web app, on Windows, Linux or Docker.
BuildVeva() sets up the host in one call: routing, sign-in, antiforgery and static assets.
One App.razor and one router. Every page address goes to a single wildcard page, which renders the page's components.
Entity Framework Core on SQL Server, or on PostgreSQL 18 and later with Veva.Web.PostgreSql.
The task daemon runs scheduled tasks on Hangfire, with Hangfire's dashboard for administrators.
A Vue 3 app over Veva's API. The designer edits the real page, rendered by Blazor in Server mode.
Render modes
Set the default in the website settings and override it per page, under the page's Advanced settings. All three render on the server, so visitors never download a .NET runtime.
The response holds the finished HTML, so the page shows at once and search engines read it. Then a Blazor Server circuit connects and the page turns interactive.
The components render over the circuit instead of in the first response. Clicks and input go to the server, and only the changes come back. The designer always works this way.
Static server-side rendering: finished HTML and nothing else. The server keeps no circuit open for the visitor. Search engines and other bots always get this mode.
In Prerender and Server mode, links move between pages inside the circuit, without a full page load. A menu link to a Static page loads it in full.
Which mode a request gets
01
The website's Page render mode is the default. It is Prerender unless you change it.
02
A page set to anything but Default uses its own mode.
03
In the designer every page renders in Server mode, so editing stays interactive.
04
Search engines and other bots get Static, whatever the page is set to.
05
?rendermode=static, server or prerender picks the mode for one request. Handy for testing.
?rendermode=Standard Blazor
A Veva component is a Blazor component you could write in any Blazor app. A few attributes put it in the editor's component picker and turn its parameters into settings.
Inside a component, everything is plain Blazor:
[Parameter] properties, RenderFragment and child components[CascadingParameter] and <CascadingValue>OnInitializedAsync, OnParametersSet and StateHasChanged@inject anything registered in the containerEditContext.razor.css file next to the componentOn top of that, a few attributes, a cascade and a slot:
[VevaComponent] and an id put it in the component picker, named and filed by [DisplayName], [Category] and [Icon][EditorBrowsable] on a parameter makes it a setting in the editor<AreaContent> is a slot that editors fill with other componentsRenderContext cascade binds tokens such as {title}, and knows the page and its render mode[AgentHint] tells the AI assistant and coding agents what the component is forThis site is built the same way. Its theme is a Razor class library of ordinary Razor components with CSS isolation, and the page you are reading is made of them.
For developers
Start from a component you would write anyway. The highlighted lines are what Veva needs to put it in the editor.
A Static page has no circuit, so OnAfterRenderAsync, event handlers and JS interop never run there.
OnAfterRenderAsyncRenderMode, in RenderContext.PageRequest, when the markup must differ. The built-in Tabs render every pane in static mode?rendermode=static@attribute [VevaComponent("6f1c2b3a-8d4e-4f5a-9b6c-7d8e9f0a1b2c")] @attribute [DisplayName("Notice")] @attribute [Category("Content")] @attribute [Icon("fas fa-circle-info")] @attribute [AgentHint("A short notice: a title and a line of text.")] <aside class="notice"> <strong>@Title</strong> <p>@Text</p> </aside> @code { [EditorBrowsable] [Parameter] public string Title { get; set; } = "Heads up"; [EditorBrowsable] [Parameter] public string Text { get; set; } }
Beyond HTML
Pages are one output. Documents and form answers go out in other formats too.
A document model serves its documents as JSON, XML, RSS or an iCalendar feed, through endpoints set up on the model.
Keep the editor and the documents, and build the front end in Vue, React or anything else over Veva's API.
The PDF generator lays out form answers with components, and Puppeteer prints them as an A4 PDF in headless Chromium.
Keep reading
Write a component and register it in a module.
Read the guideParameters editors set, bound to document fields.
Read the guideLayouts, breakpoints and CSS classes.
Read the guideModules
The ones marked Built in come with Veva.Web.Essentials. Add the others as packages, restart, and set them up in the site's settings.
Veva.Web The host: BuildVeva(), the module loader, components, themes and data binding.
dotnet add package Veva.WebVeva.Modules.Pages Renders the pages: finds the website, page, template and theme, serves the 404 page and security headers, and holds the page settings.
dotnet add package Veva.Modules.PagesVeva.Modules.StandardViewComponents 48 components, from Heading, Paragraph and Link to Tabs, Data Table, Navigation menu and Bread crumbs, and styling options such as margin and padding.
dotnet add package Veva.Modules.StandardViewComponentsVeva.Modules.Documents.ViewEndpoints.Standard Serves a model's documents as RSS, XML or JSON, through endpoints set up on the model.
dotnet add package Veva.Modules.Documents.ViewEndpoints.StandardVeva.Modules.Documents.ViewEndpoints.ICAL Serves a model's documents as an iCalendar feed, so events go straight into a calendar.
dotnet add package Veva.Modules.Documents.ViewEndpoints.ICALVeva.Modules.Puppeteer Renders the PDF generator's layout as an A4 PDF in headless Chromium, with each website's margins, header and footer.
dotnet add package Veva.Modules.PuppeteerMore of Veva
Each one is made of modules. Reference a package, restart, and its components are in the editor.
Compose pages from components, then preview and publish
OpenComponents that show, components that fetch, and the binding between them
OpenStructured content you list, filter and serve anywhere
OpenDocument forms that save, generic forms that filter or post
OpenForm answers made into a PDF, downloaded or sent to be signed
OpenOne media library, with images sized on request
OpenCrawl, index and search the whole site
OpenThe admin's AI assistant, and the MCP server coding agents connect to
OpenBuildVeva(), modules, components, themes and hooks
OpenData sources, sign-in, mail, analytics and media
OpenEvery module: what comes with Essentials, and the add-ons
Open