Skip to content
Razor catalogue

On this page

@addTagHelper *, Webority.Ui.Razor

In a real screen

A settings form as a product builds it: two sections, required fields, validation on Save and an action bar.

Company settings
layout
labels
density
Company settings
Shown on invoices and in emails to your customers

Company profile

Your legal details, as registered.

15 characters, printed on your GST certificate.
Logistics Healthcare Education Manufacturing Retail Software Travel

Preferences

How amounts, dates and reminders appear.

Indian rupee (₹) US dollar ($) UAE dirham
India (IST, UTC+5:30) Dubai (GST, UTC+4) London (GMT/BST) New York (ET)
Billing cycle
Press Enter after each tag.
Cancel

Group related fields

Wrap a set of related fields in a section with a heading and an optional description, so a form reads in parts.

Basic section

Contact Information

Show code
<app-form-section title="Contact Information">
    <app-form-row>
        <app-input label="Email" name="email" type="email" />
        <app-input label="Phone" name="phone" />
    </app-form-row>
</app-form-section>
With description

Billing Address

Where you want invoices sent

Show code
<app-form-section title="Billing Address" description="Where you want invoices sent">
    <app-form-row>
        <app-input label="Street" name="street" />
        <app-input label="City" name="city" />
    </app-form-row>
</app-form-section>

Layout, labels and density

Use the side layout on settings pages with several sections, labels beside fields on wide admin forms, and compact density for dialogs.

Title beside the fields

Notifications

Show code
<app-form-section title="Notifications" layout="Side">
    <app-form-row>
        <app-input label="Email" name="email" type="email" />
        <app-input label="Phone" name="phone" />
    </app-form-row>
</app-form-section>
Labels beside the fields

Account

We never share it.
Show code
<app-form-section title="Account" labels="Start">
    <app-form-row>
        <app-input label="Display name" name="displayName" />
        <app-input label="Email" name="email" type="email" helper-text="We never share it." />
    </app-form-row>
</app-form-section>
Compact

Filters

Show code
<app-form-section title="Filters" density="Compact">
    <app-form-row columns="3">
        <app-input label="Customer" name="customer" />
        <app-input label="Invoice" name="invoice" />
        <app-input label="Amount" name="amount" />
    </app-form-row>
</app-form-section>
Heading level
heading-level="2" sets the title to h2 so it nests under a drawer or page heading. The default is h3; the look is the same at every level.

Notifications

Show code
<app-form-section title="Notifications" heading-level="2">
    <app-form-row>
        <app-input label="Email" name="email" type="email" />
    </app-form-row>
</app-form-section>
Display title, larger, no divider
title-font="display" sets the title in the display face, title-size sets its size in px, and rule="none" drops the line above the section and keeps the space.

Company profile

Contact Information

Show code
<app-form-section title="Company profile">
    <app-form-row>
        <app-input label="Email" name="email" type="email" />
    </app-form-row>
</app-form-section>
<app-form-section title="Contact Information" title-font="Display" title-size="20" rule="None">
    <app-form-row>
        <app-input label="Phone" name="phone" />
    </app-form-row>
</app-form-section>

Composing a complete form

Combine sections, rows and actions to build a standard form, with the actions footer at the end.

Multi-section form

Personal Details

Contact

Show code
<app-form-section title="Personal Details">
    <app-form-row columns="2">
        <app-input label="First name" name="firstName" required="true" />
        <app-input label="Last name" name="lastName" required="true" />
    </app-form-row>
</app-form-section>
<app-form-section title="Contact">
    <app-form-row columns="1">
        <app-input label="Email" name="email" type="email" required="true" />
    </app-form-row>
</app-form-section>
<app-form-actions align="Between">
    <app-button variant="Outline">Cancel</app-button>
    <app-button>Save</app-button>
</app-form-actions>

Every option

Every value of every prop, one cell each.

children

children

title and description

(no title, no description)
title only

Preferences

description only

A description renders on its own too

title + description

Preferences

Control how you are notified

layout

layout="stacked" (default)

Profile

Your public details.

layout="side"

Profile

Your public details.

labels

labels="top" (default)

Profile

Your public details.

labels="start"

Profile

Your public details.

density

density="comfortable" (default)

Profile

Your public details.

density="compact"

Profile

Your public details.

title-font

title-font="body" (default)

Profile

Your public details.

title-font="display"

Profile

Your public details.

title-size

title-size (default): unset, the theme's 15px

Profile

Your public details.

title-size="20"

Profile

Your public details.

rule

rule="line" (default)

Profile

Contact

rule="none"

Profile

Contact

heading-level

heading-level="2"

Profile

Your public details.

heading-level="3" (default)

Profile

Your public details.

heading-level="4"

Profile

Your public details.

class

class: adds classes to the root element

Profile

Guidance

What to do, and what to avoid.

Use it when

  • You're building a form page: use all three helpers together for a consistent layout.
  • You need to group logically related fields: AppFormSection wraps them with a title.
  • You have multiple fields in a row: AppFormRow arranges them responsively.
  • You're adding action buttons (submit, cancel, etc.): AppFormActions keeps them aligned.

Reach for something else when

  • You're placing a single isolated field → just use AppInput directly
  • Your form is a dialog/modal → AppModal / AppConfirmDialog owns the footer logic
  • You need a custom grid layout → use Bootstrap Row/Col for full control

Reference

Try every prop, read the full list, and check keyboard and screen reader behaviour.

stacked side
top start
comfortable compact
2 3 4
body display
line none
1 2 3
end start between

Personal Details

React, generated from the controls
<AppFormSection title="Personal Details">
  <AppFormRow columns={2}>
    <AppInput label="First name" name="firstName" />
    <AppInput label="Last name" name="lastName" />
  </AppFormRow>
</AppFormSection>
<AppFormActions>
  <AppButton variant="outline">Cancel</AppButton>
  <AppButton>Save</AppButton>
</AppFormActions>
Razor, the same props
<app-form-section title="Personal Details">
    <app-form-row columns="2">
        <app-input label="First name" name="firstName" />
        <app-input label="Last name" name="lastName" />
    </app-form-row>
</app-form-section>
<app-form-actions>
    <app-button variant="Outline" type="Button">Cancel</app-button>
    <app-button type="Submit">Save</app-button>
</app-form-actions>

9 props. The 5 most used come first.

Used on most screens 5 props

PropTypeDefaultDescription
titledefault - string - Section heading, at the level heading-level sets (h3 by default).
descriptiondefault - string - Intro text under the title. Renders on its own when there is no title.
layoutdefault stacked stacked | side stacked side puts the title and description in a column beside the fields from lg up; below that it stacks.
labelsdefault top top | start top start puts each field's label beside its control (one field per row) from md up; below that labels sit on top.
densitydefault comfortable comfortable | compact comfortable compact uses 32px controls and tighter gaps, for admin screens and dialogs.

Less common 4 props

PropTypeDefaultDescription
heading-leveldefault 3 2 | 3 | 4 3 Heading level of the section title, so it nests under the page or drawer heading.
title-fontdefault body body | display body display sets the title in the display face; body keeps the text face.
title-sizedefault 15 number 15 The title's font size in px; unset keeps the theme's 15px.
ruledefault line line | none line none drops the hairline between consecutive sections and keeps the space.

Screen reader

3 notes
  • Renders a section element whose title is a real heading: h3 by default, h2 to h4 through headingLevel, so it appears in the page outline.
  • The description is a paragraph under the heading; the heading and description are left out when neither title nor description is given.
  • Extra attributes such as aria-labelledby pass through to the section.