Tabs

com.alecdorrington.laminarcomponents.Tabs
object Tabs

Tabs over one pane at a time, each pane built when its tab is first opened and kept, so that a half-filled form survives a look at another tab. Which tab is open is a mode of the page, not where it is.

Drawn as .lc-tabs, its tabs .lc-tab (.lc-tab-current while open) in a .lc-tab-strip, each name a .lc-tab-label.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Tabs.type

Members list

Type members

Classlikes

final case class Tab(label: String, content: () => L.HtmlElement, icon: Option[L.SvgElement] = ..., mark: Modifier[L.HtmlElement] = ...)

A tab and the pane it opens.

A tab and the pane it opens.

Value parameters

content

The pane's builder, run once, when the tab is first opened.

icon

An icon drawn before its name, if any.

label

The tab's name.

mark

Anything drawn after its name, such as a count.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def apply(tabs: List[Tab]): L.HtmlElement

Renders tabs, opening each as it is chosen, the first to begin with.

Renders tabs, opening each as it is chosen, the first to begin with.

Value parameters

tabs

The tabs, at least one.

Attributes

Returns

The tabs and the open tab's pane.

def apply(tabs: List[Tab], current: Signal[Int], choose: Observer[Int]): L.HtmlElement

Renders tabs, the open one decided by the caller.

Renders tabs, the open one decided by the caller.

Value parameters

choose

The observer told the place of each tab chosen.

current

The open tab's place.

tabs

The tabs, at least one.

Attributes

Returns

The tabs and the open tab's pane.