Kanban
Since 0.1.0-alpha.24IzzyBlazor.Kanban<TItem> in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.31 assembly
and its doc comments.
Properties (33)
@bind-ItemsIEnumerable<TItem>? requiredEvery card, in every column; each column shows its own in this order.
ItemKeyFunc<TItem, string>? requiredEach card's key: what posts and what keeps its elements when it moves.
ColumnOfFunc<TItem, string>? requiredThe column a card is in, matching a KanbanColumn<T>'s Value, such as t => t.Status. A card whose column the board doesn't have isn't shown.
EditDialogFormRenderFragment<KanbanEditFormContext<TItem>>?Your own form in the card's dialog, in place of the generated one, for the fields your cards have. The board opens the dialog as before (a card, its menu's Edit, a column's add button) and closes it; the form, its model and its [SupplyParameterFromForm] are yours. The context has the card (none for a new one) and its column; call context.CloseAsync() when it has saved, and put autofocus on its first field.
ReadOnlybool = falseShows the board without letting anyone change it, such as to someone who may only look: cards don't move, and there's no form, add button or column menu. Their links stay.
Searchablebool = falsePuts a search box above the board that shows only the cards matching what's typed, in their text and description or in SearchBy. On a static page the search is in the page's address (?q=…) and applies on Enter.
SearchLabelstring? = "Search"The search box's label and placeholder. Defaults to "Search".
SearchByFunc<TItem, string?>?What a card is searched by, such as d => $"{d.Name} {d.Company}", in place of its text and description.
SortByFunc<TItem, IComparable?>?Sorts each column's cards, such as t => t.Due, in place of the order they're given in. A card moved to a column takes its sorted place there.
SortDescendingbool = falseWith SortBy, sorts from last to first.
QueryPrefixstring = ""Sets this board's posts and its keys in the page's address apart, so several can share a page: QueryPrefix="orders-" uses ?orders-card=42. None by default (?card=…).
ColumnsRenderFragment?The KanbanColumn<T>s, in the order shown.
LaneOfFunc<TItem, string>?The lane a card is in, matching a KanbanLane's Value, such as t => t.Team. With it, the board has a row for each lane in Lanes, across every column, and a card moves between lanes as it does between columns.
LanesRenderFragment?The KanbanLanes, in the order shown, on a board with a LaneOf.
CardTemplateRenderFragment<TItem>?A card's content. Without it, ItemText and ItemDescription draw the card.
ItemTextFunc<TItem, string?>? (computed)The default card's text. Defaults to the card's string form.
ItemDescriptionFunc<TItem, string?>?The default card's muted second line.
ItemLabelFunc<TItem, string>? (computed)Names a card for screen readers: in its link, its ⋯ button and the announcement of a move. Defaults to ItemText, then the key; set it when CardTemplate draws the card.
ItemHrefFunc<TItem, string?>?Makes each card a link to this address; the whole card is clickable.
ItemCurrentFunc<TItem, bool>?Marks the card the page is showing, such as the one open beside the board.
ItemDisabledFunc<TItem, bool>?Dims a card and keeps it where it is: it has no link and doesn't move.
ItemAccentFunc<TItem, Accent?>?A colored line down a card's edge, such as its priority's. Color only: put the meaning in the card's text too.
ColumnSummaryFunc<IReadOnlyList<TItem>, string?>?Text under each column's header, from the column's cards, such as their total: cards => cards.Sum(d => d.Value).ToString("C0").
ColumnWidthLength = 17remThe narrowest a column gets before the board scrolls sideways. Defaults to 17rem.
MaxHeightLength?The tallest a column's cards get before they scroll under its header, such as Length.Vh(60). Without it, each column is as tall as its cards.
Collapsiblebool = falseGives each column a button that collapses it to a strip with its title and count.
AddHrefFunc<string, string?>?Puts an add button in each column's header that goes to this address, from the column's Value, such as the page that makes a card for that column.
EmptyTextstring? = "Drop items here"What an empty column says. Defaults to "Drop items here".
DragHandlebool = falseGives each card a handle to drag it by, in place of dragging from anywhere on it. The handle opens the menu of moves.
SizeControlSize = ControlSize.MdThe cards' spacing and text size. Defaults to ControlSize.Md.
Labelstring? = "Board"Names the board for screen readers. Defaults to "Board".
TitleLevelint = 3The heading level of the columns' titles, 2 to 6. Defaults to 3.
Events (9)
OnMoveEventCallback<KanbanMoveEventArgs<TItem>>OnSaveEventCallback<KanbanSave<TItem>>Saves a card from the board's form, new or changed, on a static page too (the form posts). With it, a card opens the form in a dialog (?card=42), its menu has Edit, and each column's header has an add button. The form has a title, the column and, with ItemDescription, a description: set them on the card from the save. save.AddError keeps the form open with a message.
OnDeleteEventCallback<KanbanDelete<TItem>>Deletes a card: with it, the generated form has a Delete button. Not with an EditDialogForm, whose form deletes.
OnColumnAddEventCallback<KanbanColumnChange>Runs when the user adds a column, on a static page too: with it, an Add column button after the columns opens a form for its title. Add the column to the list you render Columns from, with a Value of your own.
OnColumnRenameEventCallback<KanbanColumnChange>Runs when the user renames a column: with it, each column's ⋯ menu has Edit, which opens a form for its title.
OnColumnDeleteEventCallback<KanbanColumnDelete>Runs when the user deletes a column: with it, the column's form has a Delete button, which asks first. Its cards are yours to move or delete.
OnColumnMoveEventCallback<KanbanColumnMoveEventArgs>OnItemClickEventCallback<TItem>Makes each card a button that runs this, on interactive pages. Cards with an ItemHref are links instead.
OnAddEventCallback<string>Puts an add button in each column's header that runs this with the column's Value, on interactive pages.
Parts (2)
Components written inside Kanban, documented here with it.
KanbanColumn<TItem>
A column of a Kanban: the cards whose ColumnOf is its Value, under a header with its Title and how many cards it holds and, with the board's ColumnSummary, a figure from them below it.
Valuestring? requiredThe column's value: it shows the cards whose ColumnOf is this, and a card moved here takes it.
Limitint?How many cards the column should hold at most. The count shows it ("3 / 5") and changes color past it; cards still move in.
MinItemsint?How many cards the column should hold at least. The count changes color below it.
AcceptsFunc<TItem, bool>?Which cards may move here from other columns, such as t => t.Reviewed.
@bind-Collapsedbool = falseWith the board's Collapsible, whether the column is collapsed to a strip. Bind it on an interactive page to keep it; on a static page it lasts until the page is loaded again.
AccentAccent?A colored dot before the title. Color only: the title says what the column is.
Plus 4 common props.
KanbanLane
A lane of a Kanban<T>: a row across the board's columns holding the cards whose LaneOf is its Value, such as a team's or a priority's, under a header with its title and how many cards it holds. Put the lanes in the board's Lanes.
Valuestring? requiredThe lane's value: it shows the cards whose LaneOf is this, and a card moved here takes it.
@bind-Collapsedbool = falseWith the board's Collapsible, whether the lane is collapsed to its header. Bind it on an interactive page to keep it.
Types (10)
Accent
classThe color of a control: buttons, badges, tags, banners, progress bars and menu items. Primary, Neutral and Danger are the roles; emphasis comes from the variant (solid, soft, outline, ghost, link), not from more colors. For one control in another color, use Of (any CSS color) or Token (a theme token); text on it is chosen for contrast.
| Member | Description |
|---|---|
Primary | The brand color, for the main action. |
Neutral | A quiet, gray action. |
Danger | A destructive action, such as Delete. |
Of(string css) | Any CSS color, such as |
Token(string name) | A theme token, such as |
From(Color color) | A |
ControlSize
enumThe height of interactive controls. Shared by buttons and form fields, so a button and an input of the same size line up in a row.
| Value | Description |
|---|---|
Sm | 32px tall, small text. |
Md | 36px tall (the default). |
Lg | 44px tall, large text. For touch-first and marketing pages. |
KanbanColumnChange
classA column a user added or renamed on a Kanban<T>, for its OnColumnAdd and OnColumnRename. With an error added, the form stays open and shows it.
| Member | Description |
|---|---|
Column string? | The column's |
Title string | The title the user typed. |
AddError(string message) | Reports a problem, shown at the top of the form, which stays open. |
KanbanColumnDelete
classA column a user deleted on a Kanban<T>, for its OnColumnDelete. With an error added, the form stays open and shows it.
| Member | Description |
|---|---|
Column string | The column's |
AddError(string message) | Reports why it can't be deleted (it still has cards, say), shown at the top of the form, which stays open. |
KanbanColumnMoveEventArgs
classA column a user moved on a Kanban<T>, for its OnColumnMove: put it at ToIndex in your list of columns.
| Member | Description |
|---|---|
Column string | The column's |
FromIndex int = 0 | Its place before the move, from 0. |
ToIndex int = 0 | Its place after the move, from 0. |
KanbanDelete
classA delete from a Kanban<T>'s form, for its OnDelete. With an error added, the form stays open and shows it.
| Member | Description |
|---|---|
Item TItem | The card to delete. |
AddError(string message) | Reports why it can't be deleted, shown at the top of the form, which stays open. |
KanbanEditFormContext
classWhat a Kanban's EditDialogForm gets.
| Member | Description |
|---|---|
Item TItem | The card as the board has it, which isn't a copy, or the default for a new one. |
IsNew bool | Whether it's a new card. |
Column string | The card's column, or for a new card the column whose add button opened the form. |
Lane string? | On a board with lanes, the card's lane, or the first lane for a new card. |
CloseAsync() | Closes the dialog, once your form has saved. |
KanbanMoveEventArgs
classA card's move on a Kanban<T>, before the board changes.
| Member | Description |
|---|---|
Item TItem | The card that moves. |
Key string | Its key. |
FromColumn string | The column it moves from: a |
ToColumn string | The column it moves to; the same as |
FromLane string? | On a board with lanes, the lane it moves from: a |
ToLane string? | On a board with lanes, the lane it moves to; the same as |
FromIndex int = 0 | Its place before the move, from 0, among its column's cards (in its lane, on a board with lanes). |
ToIndex int = 0 | Its place after the move, from 0, among the cards of the column it moves to. |
Cancel bool = false | Set to keep the card where it was, such as when saving the move failed. |
KanbanSave
classA save from a Kanban<T>'s form, for its OnSave: the form's values, and the card they're for (none for a new one). With no errors added, the form closes; with errors, it stays open and shows them.
| Member | Description |
|---|---|
Item TItem | The card being edited, or the default for a new one. |
IsNew bool | Whether it's a new card. |
Fields KanbanEditFields | The form's values. |
Title string | The title. |
Description string? | The description, when the board has one. |
Column string | The column: one of the board's, by its |
Lane string? | On a board with lanes, the lane: one of the board's, by its |
AddError(string message) | Reports a problem with the save, shown at the top of the form, which stays open. |
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. |