Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

TileLayout

Since 0.1.0-alpha.24
Places a dashboard's panels on a grid of columns and rows, each spanning as many as it needs.

IzzyBlazor.TileLayout in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.32 assembly and its doc comments.

Properties (12)

ChildContentRenderFragment?Added in 0.1.0-alpha.24

The Tiles.

ColumnsResponsive<int> = 1 md:12ResponsiveAdded in 0.1.0-alpha.24

How many columns, all the same width, per breakpoint. Defaults to 1, then 12 from Breakpoint.Md. Tiles are placed at the widest count; at narrower ones they wrap in reading order, their spans shrunk in proportion. Unless Base is set, it's 1.

Rowsint = 0Added in 0.1.0-alpha.24

How many rows at the widest column count, up to 200. Tiles are kept inside them, and the layout is as tall as all of them, empty ones included. Defaults to 0: as many as the tiles need, up to 200. At fewer columns, as many as the tiles need.

RowHeightLength = 8remAdded in 0.1.0-alpha.24

The height of a row. Defaults to 8rem.

Gapint = 4Added in 0.1.0-alpha.24

Space between tiles, in spacing steps (0 to 16). Defaults to 4.

@bind-StateTileLayoutState?Added in 0.1.0-alpha.24 @bind: Interactive only

The layout saved for this person: each tile's place and size by its Id. Tiles it doesn't name keep their own; entries for tiles that aren't there are ignored.

Editablebool = falseAdded in 0.1.0-alpha.24

Lets the user move and resize the tiles: each gets a handle whose menu moves it a cell at a time and makes it wider, narrower, taller or shorter. Only at the widest column count; at fewer columns the handles hide. On a static page it needs a Name inside a form.

Without JavaScript: Each move from a tile's menu posts the form.

ShowGridbool = falseAdded in 0.1.0-alpha.24

While Editable, outlines every cell, so the user sees where tiles can go.

CollisionTileCollision = TileCollision.PushAdded in 0.1.0-alpha.24

What a move onto another tile does. Defaults to TileCollision.Push: the tile in the way takes the moved tile's old cells when it fits there, else it moves down.

Compactbool = falseAdded in 0.1.0-alpha.24

With TileCollision.Push, every tile rises as far as it can after each move, closing the gaps above it. By default tiles stay where they're dropped, empty cells and all.

Namestring?Added in 0.1.0-alpha.24

On a static page, the name an editable layout posts under: {Name}.Tiles (the layout shown) and {Name}.Move (a move from a tile's menu), bound as a TileLayoutPost. Pass that back as Post.

PostTileLayoutPost?Added in 0.1.0-alpha.24

On a static page, what the layout posted, bound under its Name: it shows the posted layout with the posted move made, over State.

Events (0)

No events.

Parts (1)

Components written inside TileLayout, documented here with it.

Tile

One tile of a TileLayout: a header with an icon, title and actions, over its content. It sits at Col and Row and spans ColSpan columns and RowSpan rows; without Col and Row it takes the first free cells.

Idstring?Added in 0.1.0-alpha.24

The tile's id in the layout's State, which saves its place and size. Keep it the same across visits: a saved layout finds the tile by it.

Colint?Added in 0.1.0-alpha.24

Its first column, from 1. Set both Col and Row, or neither to take the first free cells.

Rowint?Added in 0.1.0-alpha.24

Its first row, from 1. Set both Col and Row, or neither to take the first free cells.

ColSpanint = 1Added in 0.1.0-alpha.24

How many columns it spans. Defaults to 1.

RowSpanint = 1Added in 0.1.0-alpha.24

How many rows it spans. Defaults to 1.

Labelstring?Added in 0.1.0-alpha.24

Names the tile for screen readers when it has no Title, such as a tile holding a Stat, and its handle in an editable layout ("Move Revenue").

MinColSpanint = 1Added in 0.1.0-alpha.24

The fewest columns its menu can narrow it to. Defaults to 1.

MaxColSpanint? (computed)Added in 0.1.0-alpha.24

The most columns its menu can widen it to. Defaults to the layout's columns.

MinRowSpanint = 1Added in 0.1.0-alpha.24

The fewest rows its menu can shorten it to. Defaults to 1.

MaxRowSpanint? (computed)Added in 0.1.0-alpha.24

The most rows its menu can make it. Defaults to no limit (the layout's Rows, when set).

Titlestring?Added in 0.1.0-alpha.24

The heading in its header. Names the tile for screen readers.

TitleLevelint = 3Added in 0.1.0-alpha.24

The heading level of Title, 2 to 6. Defaults to 3.

IconIconData?Added in 0.1.0-alpha.24

An icon before the title.

HeaderRenderFragment?Added in 0.1.0-alpha.24

Your own header content in place of the icon and title. It names the tile for screen readers.

HeaderEndRenderFragment?Added in 0.1.0-alpha.24

What sits at the end of the header, across from the title: buttons such as a refresh or a Menu, or a figure such as a count.

TitleIdstring?Added in 0.1.0-alpha.24

An id for the title's heading, for content to take its name from, such as a Chart with TitledBy set to it. Generated when not set.

Flushbool = falseAdded in 0.1.0-alpha.24

Runs the content to the tile's edges, without padding: for Tabs, a DataGrid or a map.

ChildContentRenderFragment?Added in 0.1.0-alpha.24

The tile's content. It scrolls inside the tile when longer.

Types (4)

Length

struct

A width, height or flex basis: a size token, a keyword, or a CSS length built with a factory such as Rem.

Length members
MemberDescription
Sm

640px (matches the sm breakpoint).

Md

768px (matches the md breakpoint).

Lg

1024px (matches the lg breakpoint).

Xl

1280px (matches the xl breakpoint).

Prose

A comfortable reading width, 68 characters.

Full

100% of the containing block.

Auto

auto.

FitContent

fit-content: as wide as the content, up to the available space.

MinContent

min-content.

MaxContent

max-content.

Px(double value)

Pixels.

Rem(double value)

Root ems (16px each by default).

Percent(double value)

Percent of the containing block.

Ch(double value)

Character widths, for text measures.

Vw(double value)

Percent of the viewport width.

Dvh(double value)

Percent of the dynamic viewport height (accounts for mobile browser bars).

Of(string css)

Any CSS length, such as calc(100% - 2rem). Checked for unsafe characters.

Css string

The CSS value this length renders as.

TileCollision

enum

What happens when a TileLayout's tile is moved or resized onto another.

TileCollision values
ValueDescription
Push

The tile takes the cells. A tile in the way takes the moved tile's old cells when it fits there (two tiles of a size swap), else it moves down, pushing the tiles below it.

Block

The move isn't made: a dragged tile stays at its last free spot.

Overlap

The tile covers the other.

TileLayoutPost

class

What an editable TileLayout posts on a static page: the layout it showed, and the move its menu asked for. Bind it with [SupplyParameterFromForm(FormName = "...", Name = "...")] under the layout's Name and pass it back as Post, so the layout shows the move. Save State when the form's own submit posted (Move is null).

TileLayoutPost members
MemberDescription
Tiles string?

The layout as shown, written by ToString.

Move string?

The move a tile's menu posted, such as right:revenue; null when the form's own submit posted.

State TileLayoutState?

The layout as shown, without Move; null when none posted.

TileLayoutState

record

A TileLayout's layout: each tile's place and size, keyed by its Id. Save it per user and pass it back as State. ToString and Parse give a short string for a cookie or a database column.

TileLayoutState members
MemberDescription
Parse(string? text)

Reads a string written by ToString. Entries that don't read are skipped, so a cookie from an older layout still gives what it can; null or empty gives null.

Tiles IReadOnlyList<TileState>

Each tile's place and size.

Find(string id)

The entry for a tile, or null when the state has none for it.

Connection lost

Rejoining the server…