Skip to content
Razor catalogue

On this page

@addTagHelper *, Webority.Ui.Razor

Files

Show the files a person reads or opens as tiles, with a link on each file that has a destination.

Default
Three files, each with a type tile, its name, size and a meta line; two are links and one is plain.
Show code
<app-file-tiles label="Attachments">
    <app-file-tile name="Project brief.pdf" href="/files/brief.pdf" size-bytes="248320" meta="Asha Rao, 22-Oct-2026" />
    <app-file-tile name="Site plan.png" href="/files/site-plan.png" size-bytes="1572864" meta="Ravi Menon, 23-Oct-2026" />
    <app-file-tile name="Meeting notes.docx" size-bytes="48213" meta="Asha Rao, 24-Oct-2026" />
</app-file-tiles>

Every option

Every value of every prop, one cell each.

label

label: names the list for screen readers, no visual change
  • Meeting notes.docx

files

files: no app-file-tile children (default)
    name: its extension makes the type tile
    • Site plan.png
    href: makes the tile a link
    size-bytes: the size in bytes, shown as a readable size (React: sizeBytes)
    • Meeting notes.docx47.1 KB
    meta: text after the size
    • Meeting notes.docxAsha Rao, 24-Oct-2026

    className

    class: extra classes on the list (React: className)
    • Meeting notes.docx

    Guidance

    What to do, and what to avoid.

    Use it when

    • A few files attached to a record that the person reads rather than edits.
    • Files that open or download from the page, each shown with its type and size.

    Reach for something else when

    • The person picks or uploads the files. → AppFileAttachment
    • One file to read in the page. → AppFileViewer

    Reference

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

    React, generated from the controls
    <AppFileTiles label="Attachments" files={files} />
    Razor, the same props
    <app-file-tiles label="Attachments">…</app-file-tiles>

    5 props. The 1 most used come first.

    Used on most screens 1 props

    PropTypeDefaultDescription
    labeldefault - string - Accessible name of the list.

    Less common 4 props

    PropTypeDefaultDescription
    app-file-tile namedefault - string - The file name. Its extension makes the type tile. Required.
    app-file-tile hrefdefault - string - The address the file opens or downloads from. The tile is a link when set.
    app-file-tile size-bytesdefault - number - The file size in bytes, shown as a size such as 1.5 MB.
    app-file-tile metadefault - string - Text after the size, such as a person and a date.

    Screen reader

    3 notes
    • The list takes its accessible name from label.
    • The type tile is hidden from assistive technology; the file name carries the meaning.
    • A file with an href is a link; a file without one is plain text.