TaskBoard

Description

A board for managing tasks

TaskBoard provides a Trello-like interface with draggable columns and cards. Use it for Kanban boards and task management.

Sample

API reference

class

TaskBoard

public class TaskBoard : IComponent, IHasMarginPadding

A kanban-style board with named columns and draggable cards.

Namespace
Tesserae
Implements
IComponent, IHasMarginPadding

Constructors

NameDescription
TaskBoardInitializes a new instance of this class.
Constructor
TaskBoard
public TaskBoard()

Initializes a new instance of this class.

Properties

NameDescription
MarginGets or sets the CSS margin of the component.
PaddingGets or sets the CSS padding of the component.
Property
TaskBoard.Margin
public string Margin { get ; set ; }

Gets or sets the CSS margin of the component.

Property
TaskBoard.Padding
public string Padding { get ; set ; }

Gets or sets the CSS padding of the component.

Methods

NameDescription
AddColumnAdds the given column to the component.
ColumnsDefines the columns of the grid (track sizes).
ReadOnlyConfigures the read only on the component.
ReorderColumnsWhether the columns themselves can be dragged into another order (on by default). Turn it off for a board whose columns are a fixed workflow; the cards still move between them.
StretchColumnsMakes the columns share the board's width instead of each being 300px wide, down to 220px each before the board scrolls - so a board with a handful of columns shows all of them. Has no effect in RowMode.
OnColumnDropRegisters a callback invoked when the column drop event fires.
OnColumnUpdateRegisters a callback invoked when the column update event fires.
RowModeConfigures the row mode on the component.
RenderRenders the component's root HTML element.
Method
TaskBoard.AddColumn
public TaskBoard AddColumn(TaskBoardColumn column)

Adds the given column to the component.

Method
TaskBoard.Columns
public TaskBoard Columns(params TaskBoardColumn[] columns)

Defines the columns of the grid (track sizes).

Method
TaskBoard.ReadOnly
public TaskBoard ReadOnly(bool isReadOnly = true)

Configures the read only on the component.

Method
TaskBoard.ReorderColumns
public TaskBoard ReorderColumns(bool reorderColumns = true)

Whether the columns themselves can be dragged into another order (on by default). Turn it off for a board whose columns are a fixed workflow; the cards still move between them.

Method
TaskBoard.StretchColumns
public TaskBoard StretchColumns(bool stretchColumns = true)

Makes the columns share the board's width instead of each being 300px wide, down to 220px each before the board scrolls - so a board with a handful of columns shows all of them. Has no effect in RowMode.

Method
TaskBoard.OnColumnDrop
public TaskBoard OnColumnDrop(Action<SortableEvent> onColumnDrop)

Registers a callback invoked when the column drop event fires.

Method
TaskBoard.OnColumnUpdate
public TaskBoard OnColumnUpdate(Action<SortableEvent> onColumnUpdate)

Registers a callback invoked when the column update event fires.

Method
TaskBoard.RowMode
public TaskBoard RowMode(bool isRowMode = true)

Configures the row mode on the component.

Method
TaskBoard.Render
public HTMLElement Render()

Renders the component's root HTML element.

class

TaskBoardColumn

public class TaskBoardColumn : IComponent
Namespace
Tesserae
Implements
IComponent

Constructors

NameDescription
TaskBoardColumnInitializes a new instance of this class.
Constructor
TaskBoardColumn
public TaskBoardColumn(string title, string sortableGroup = "taskboard")

Initializes a new instance of this class.

Properties

NameDescription
IsReadOnlyReturns a value indicating whether the component is read only.
Property
TaskBoardColumn.IsReadOnly
public bool IsReadOnly { get ; internal set ; }

Returns a value indicating whether the component is read only.

Methods

NameDescription
AcceptDropsWhether a card dragged from another column of the same group may be dropped here. A column that refuses drops still lets its own cards be reordered and dragged out, unless they are Locked.
HeaderCommandsPlaces components on the right of the column's header, beside its title - a count, a badge, an add button. Replaces whatever was there.
OnCardDropRegisters a callback invoked when the card drop event fires.
OnCardAddRegisters a callback invoked when the card add event fires.
OnCardRemoveRegisters a callback invoked when the card remove event fires.
OnCardUpdateRegisters a callback invoked when the card update event fires.
CardsConfigures the component to cards.
AddCardAdds the given card to the component.
RenderRenders the component's root HTML element.
Method
TaskBoardColumn.AcceptDrops
public TaskBoardColumn AcceptDrops(bool acceptDrops = true)

Whether a card dragged from another column of the same group may be dropped here. A column that refuses drops still lets its own cards be reordered and dragged out, unless they are Locked.

Method
TaskBoardColumn.HeaderCommands
public TaskBoardColumn HeaderCommands(params IComponent[] commands)

Places components on the right of the column's header, beside its title - a count, a badge, an add button. Replaces whatever was there.

Method
TaskBoardColumn.OnCardDrop
public TaskBoardColumn OnCardDrop(Action<SortableEvent> onCardDrop)

Registers a callback invoked when the card drop event fires.

Method
TaskBoardColumn.OnCardAdd
public TaskBoardColumn OnCardAdd(Action<SortableEvent> onCardAdd)

Registers a callback invoked when the card add event fires.

Method
TaskBoardColumn.OnCardRemove
public TaskBoardColumn OnCardRemove(Action<SortableEvent> onCardRemove)

Registers a callback invoked when the card remove event fires.

Method
TaskBoardColumn.OnCardUpdate
public TaskBoardColumn OnCardUpdate(Action<SortableEvent> onCardUpdate)

Registers a callback invoked when the card update event fires.

Method
TaskBoardColumn.Cards
public TaskBoardColumn Cards(params TaskBoardCard[] cards)

Configures the component to cards.

Method
TaskBoardColumn.AddCard
public TaskBoardColumn AddCard(TaskBoardCard card)

Adds the given card to the component.

Method
TaskBoardColumn.Render
public HTMLElement Render()

Renders the component's root HTML element.

class

TaskBoardCard

public class TaskBoardCard : IComponent
Namespace
Tesserae
Implements
IComponent

Constructors

NameDescription
TaskBoardCardInitializes a new instance of this class.
Constructor
TaskBoardCard
public TaskBoardCard(IComponent content)

Initializes a new instance of this class.

Properties

NameDescription
IsLockedReturns whether the card is Locked.
Property
TaskBoardCard.IsLocked
public bool IsLocked

Returns whether the card is Locked.

Methods

NameDescription
LockedKeeps the card where it is: it cannot be dragged to another place or column, while its own content stays clickable. The other cards of its column can still be dragged around it.
HeaderConfigures the component to header.
FooterConfigures the component to footer.
RenderRenders the component's root HTML element.
Method
TaskBoardCard.Locked
public TaskBoardCard Locked(bool isLocked = true)

Keeps the card where it is: it cannot be dragged to another place or column, while its own content stays clickable. The other cards of its column can still be dragged around it.

Method
TaskBoardCard.Header
public TaskBoardCard Header(IComponent headerContent)

Configures the component to header.

Method
TaskBoardCard.Footer
public TaskBoardCard Footer(IComponent footerContent)

Configures the component to footer.

Method
TaskBoardCard.Render
public HTMLElement Render()

Renders the component's root HTML element.

See also