Skip to content

Components · data binding

Show it, or supply it.

Presentation components render what an editor sets: text, links, buttons, images. Data-providing components have no look of their own. They fetch documents, assets or rows and hand each one to the components inside them, which bind its fields by name.

dotnet add package Veva.Web.Essentials

Two kinds

What it shows, and where it comes from.

Most pages mix both. A Document List fetches the news, and a Heading, an Image and a Link inside it show each story.

Presentation components

UI

They render markup from the properties an editor sets, and bind any of them to data.

  • Text: Heading, Paragraph, Block quote, List, Footnotes
  • Links and buttons: Link (with a theme button class it is a button), Action button
  • Media: Image, Video, Audio, Icon, QR code
  • Layout: Grid, Wrap grid, Tabs, Collapsible section, Conditional panel

Data-providing components

Data

They render no look of their own. They fetch items and put each one in the data binding for the components placed inside them.

  • Documents: Document List, Document, Linked documents, Inline documents
  • Assets: Images, Assets from folder
  • Rows: Data Table, from documents, a static table or bound data
  • Paging: Paging container, Paging info, Continuous paging

What it does

Two kinds of component, one binding.

Designs or your own layout

A data provider's Design picks a ready look. The Iteration design repeats components you place instead.

Iteration components

In the Iteration design, a Wrap grid, a List or the Standard iterator repeats the item template per item.

Placeholders

{title}, {_Published:d. MMMM yyyy}, {price??On request}: a field, a .NET format or a fallback text.

Page and site values

{_PageTitle}, a query string value as {_qs_category}, or a site-wide value as {_global_phone}.

Nesting by scope

Linked documents only go inside a Document or Document List. The designer offers it only there.

Hints for agents

AgentHint says what a component is for, so the AI assistant and coding agents place it right.

How it works

From a document to a bound heading.

  1. 01

    Fetch

    A Document List queries a model, with its filters and paging.

    Document List
  2. 02

    Hand over

    Each document's fields go into a data binding context of its own.

    DataBindingContext
  3. 03

    Repeat

    An iteration component renders the item template once per document.

    Wrap grid
  4. 04

    Bind

    A Heading in the template shows {title}. An Image takes the field its Data binding key names.

    {title}
  5. 05

    Render

    The server binds the text as it renders, so the HTML it sends holds the values.

For developers

A data provider of your own.

Make a child of the surrounding data binding context, add your values and cascade it to an area. Whatever editors place in that area binds them, with no code of its own.

Extension points

API

Supply data, or render it, from your own code:

  • DataBindingContext: the values components bind, in Veva.Core.Domain.DataBinding
  • IIterationComponent: renders the items an Iterator hands it
  • ITabularDataProvider: the rows of a Data Table
  • IDocumentProvider: decides which document a Document shows
OpeningHours.razor
@attribute [VevaComponent("3e7d2a91-5c4b-4f0e-8a6d-1b2c3d4e5f60")]
@attribute [DisplayName("Opening hours")]
@attribute [Category("Data")]
@attribute [AgentHint("Today's opening hours. Put components in its 'template' area and bind {Opens:HH:mm} and {Closes:HH:mm}.")]
@attribute [ContentArea("template", "Shows the opening hours.")]

<CascadingValue Name="DataBindingContext" Value="@Hours()">
    <AreaContent Name="template" />
</CascadingValue>

@code {
    [CascadingParameter(Name = "DataBindingContext")]
    public DataBindingContext Parent { get; set; }

    private DataBindingContext Hours() =>
        Parent.CreateChildContext()
              .AddItem("Opens", new TimeOnly(9, 0))
              .AddItem("Closes", new TimeOnly(17, 0));
}

Keep reading

Guides for this module.

All articles

Modules

What it is made of.

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.

Module library

Web

Veva.Web

The host: BuildVeva(), the module loader, components, themes and data binding.

Layer
dotnet add package Veva.Web

Assets

Veva.Modules.Assets

The media library, with files at /library addresses and images resized, cropped and sharpened on request. Adds the Image, Images, Video and Audio components.

Built in
dotnet add package Veva.Modules.Assets

Standard components

Veva.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.

Built in
dotnet add package Veva.Modules.StandardViewComponents

Documents

Veva.Modules.Documents

Models and their documents, in the Documents section. Adds the Document List, Document, Linked documents and Document Form components.

Built in
dotnet add package Veva.Modules.Documents

Markdown

Veva.Modules.MarkdownParsing.MarkdigParser

Renders the Markdown in Paragraph text with Markdig, with syntax highlighting in code blocks.

Built in
dotnet add package Veva.Modules.MarkdownParsing.MarkdigParser

Data sources

Veva.Modules.DataSources

Shows data from other systems on your pages. Add .HTTP, .SQL or .WebScraping for the source you read.

Add-on
dotnet add package Veva.Modules.DataSources

YouTube

Veva.Modules.Components.YouTube

A YouTube video component. Paste a YouTube address into the Add Content dialog to insert one.

Add-on
dotnet add package Veva.Modules.Components.YouTube

Vimeo

Veva.Modules.Components.Vimeo

A Vimeo video component. Paste a Vimeo address into the Add Content dialog to insert one.

Add-on
dotnet add package Veva.Modules.Components.Vimeo

Google Maps

Veva.Modules.Components.GoogleMaps

A Google Maps component. Paste a map into the Add Content dialog to insert one.

Add-on
dotnet add package Veva.Modules.Components.GoogleMaps

Infogram

Veva.Modules.Infogram

Browse your Infogram account in the Add Content dialog and embed a chart with a click.

Add-on
dotnet add package Veva.Modules.Infogram

ReadSpeaker

Veva.Modules.ReadSpeaker

A Listen button that reads the page, or a part of it, aloud through ReadSpeaker. Set your ReadSpeaker customer ID in the website settings.

Add-on
dotnet add package Veva.Modules.ReadSpeaker

Font Awesome

Veva.Modules.FontAwesome

Font Awesome icons for the Icon component and the icon picker.

Add-on
dotnet add package Veva.Modules.FontAwesome

Font Awesome Pro

Veva.Modules.FontAwesomePro

Font Awesome Pro icons for the Icon component and the icon picker, in place of the free set.

Add-on
dotnet add package Veva.Modules.FontAwesomePro

Animate.css

Veva.Modules.AnimateCSS

A component modifier that puts an Animate.css animation on any component.

Add-on
dotnet add package Veva.Modules.AnimateCSS

Swiper

Veva.Modules.Components.Swiper

Sliders and carousels, built on the Swiper library.

Add-on
dotnet add package Veva.Modules.Components.Swiper

Chart.js

Veva.Modules.ChartJS

Chart components, such as a bar chart and a line chart, built on Chart.js.

Add-on
dotnet add package Veva.Modules.ChartJS

Hyphenation

Veva.Modules.Hypen

A component modifier that hyphenates text in the browser, with Icelandic and English patterns.

Add-on
dotnet add package Veva.Modules.Hypen

More of Veva

Explore the other features.

Each one is made of modules. Reference a package, restart, and its components are in the editor.

All features

Page builder

Compose pages from components, then preview and publish

Open

Documents

Structured content you list, filter and serve anywhere

Open

Forms

Document forms that save, generic forms that filter or post

Open

PDFs and signing

Form answers made into a PDF, downloaded or sent to be signed

Open

Assets

One media library, with images sized on request

Open

Search

Crawl, index and search the whole site

Open

AI and agents

The admin's AI assistant, and the MCP server coding agents connect to

Open

Veva core

BuildVeva(), modules, components, themes and hooks

Open

Tech stack

Plain .NET Blazor: three render modes, standard components

Open

Integrations

Data sources, sign-in, mail, analytics and media

Open

Module library

Every module: what comes with Essentials, and the add-ons

Open

Type to search the docs, components and API.

↑↓ to move ↵ to open Esc to close Search by Veva