TileLayout
Since 0.1.0-alpha.24IzzyBlazor.TileLayout in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.32 assembly
and its doc comments.
Properties (12)
ChildContentRenderFragment?The Tiles.
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 = 0How 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 = 8remThe height of a row. Defaults to 8rem.
Gapint = 4Space between tiles, in spacing steps (0 to 16). Defaults to 4.
@bind-StateTileLayoutState?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 = falseLets 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.
CollisionTileCollision = TileCollision.PushWhat 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 = falseWith 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?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.
Plus 17 item props and 4 common props.
Show them hereEvents (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?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.
ColSpanint = 1How many columns it spans. Defaults to 1.
RowSpanint = 1How many rows it spans. Defaults to 1.
Labelstring?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 = 1The fewest columns its menu can narrow it to. Defaults to 1.
MaxColSpanint? (computed)The most columns its menu can widen it to. Defaults to the layout's columns.
MinRowSpanint = 1The fewest rows its menu can shorten it to. Defaults to 1.
MaxRowSpanint? (computed)The most rows its menu can make it. Defaults to no limit (the layout's Rows, when set).
Titlestring?The heading in its header. Names the tile for screen readers.
TitleLevelint = 3The heading level of Title, 2 to 6. Defaults to 3.
IconIconData?An icon before the title.
HeaderRenderFragment?Your own header content in place of the icon and title. It names the tile for screen readers.
HeaderEndRenderFragment?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?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 = falseRuns the content to the tile's edges, without padding: for Tabs, a DataGrid or a map.
ChildContentRenderFragment?The tile's content. It scrolls inside the tile when longer.
Plus 4 common props.
Types (4)
Length
structA width, height or flex basis: a size token, a keyword, or a CSS length built with a factory such as Rem.
| Member | Description |
|---|---|
Sm | 640px (matches the |
Md | 768px (matches the |
Lg | 1024px (matches the |
Xl | 1280px (matches the |
Prose | A comfortable reading width, 68 characters. |
Full | 100% of the containing block. |
Auto |
|
FitContent |
|
MinContent |
|
MaxContent |
|
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 |
Css string | The CSS value this length renders as. |
TileCollision
enumWhat happens when a TileLayout's tile is moved or resized onto another.
| Value | Description |
|---|---|
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
classWhat 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).
| Member | Description |
|---|---|
Tiles string? | The layout as shown, written by |
Move string? | The move a tile's menu posted, such as |
State TileLayoutState? | The layout as shown, without |
TileLayoutState
recordA 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.
| Member | Description |
|---|---|
Parse(string? text) | Reads a string written by |
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. |