com.alecdorrington.laminarcomponents
Members list
Type members
Classlikes
Where an element's text stands on its baseline. Fonts differ by platform and script, so the baseline is measured rather than assumed, as to draw a rule beneath each line of text.
Where an element's text stands on its baseline. Fonts differ by platform and script, so the baseline is measured rather than assumed, as to draw a rule beneath each line of text.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Baseline.type
A short chime for something arriving, two soft notes made on the spot. A page may make sound only once someone has pressed a key or clicked on it, so it is silent until then (listen); it chimes at most once in a while, and for any one arrival, only in one of the reader's tabs.
A short chime for something arriving, two soft notes made on the spot. A page may make sound only once someone has pressed a key or clicked on it, so it is silent until then (listen); it chimes at most once in a while, and for any one arrival, only in one of the reader's tabs.
Value parameters
- key
-
The key in local storage under which the reader's tabs agree which of them chimes.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
A swatch opening a popover that chooses a colour from given swatches, by shade and hue, or by its #rrggbb code. The popover is position: fixed and placed again beside its swatch on every scroll, so that a scrolling list cannot clip it. A colour is chosen only once a gesture settles (a drag let go), never mid-drag, so that choosing may ask a question or save.
A swatch opening a popover that chooses a colour from given swatches, by shade and hue, or by its #rrggbb code. The popover is position: fixed and placed again beside its swatch on every scroll, so that a scrolling list cannot clip it. A colour is chosen only once a gesture settles (a drag let go), never mid-drag, so that choosing may ask a question or save.
Drawn as .lc-colour-picker, its swatch .lc-colour-swatch, and its popover .lc-colour-popover, holding the .lc-colour-presets (.lc-colour-preset), the .lc-colour-field of shades (its thumb .lc-colour-field-thumb), the .lc-colour-hue slider and the .lc-colour-code field.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ColourPicker.type
The page's one confirmation dialog, drawn by a single host at the root so that no ancestor of the asking control can clip it. Cancelling is the default.
The page's one confirmation dialog, drawn by a single host at the root so that no ancestor of the asking control can clip it. Cancelling is the default.
Drawn as .lc-confirm-dialog over a .lc-confirm-backdrop, its question a .lc-confirm-subject over a .lc-confirm-consequence, and its buttons .lc-confirm-buttons in .lc-confirm-actions: .lc-confirm-cancel, and each answer .lc-confirm-answer, or .lc-confirm-danger if it destroys.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ConfirmDialog.type
Stylesheets written in Scala, with Laminar's own typed style props: rules for selectors, holding what an element's inline styles cannot, its states (:hover), its parts (::after), and styles for some media alone (@media), with keyframes and font faces besides.
Stylesheets written in Scala, with Laminar's own typed style props: rules for selectors, holding what an element's inline styles cannot, its states (:hover), its parts (::after), and styles for some media alone (@media), with keyframes and font faces besides.
A rule nested in another applies within it, its & standing for the outer rule's selector (else a descendant of it), as in CSS nesting, but each is written out whole, for any browser:
import com.raquo.laminar.api.L.*
import com.alecdorrington.laminarcomponents.Css.{media, rule}
val styles = Stylesheet(
rule(".card")(
padding.px(12),
borderRadius.px(8),
rule("&:hover")(backgroundColor := "#eef"),
rule(".card-title")(fontWeight.bold),
media("(max-width: 600px)")(padding.px(8)),
),
)
Import the builders by name, as Laminar has a media of its own.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Css.type
The style props Laminar lacks, among them the logical properties (which follow the text's direction), grid layout, and the font face descriptors (Css.fontFace), each set as Laminar's own are: insetInlineStart.px(0) will not do, as these take any value, so insetInlineStart := "0".
The style props Laminar lacks, among them the logical properties (which follow the text's direction), grid layout, and the font face descriptors (Css.fontFace), each set as Laminar's own are: insetInlineStart.px(0) will not do, as these take any value, so insetInlineStart := "0".
Import them by name or all at once (CssProps.*): if Laminar gains one, the two clash where it is used, and this one should go. Two are named apart from attributes Laminar has: translation and fontSource.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CssProps.type
A drop-down of options, each sent under its code, one of them chosen.
A drop-down of options, each sent under its code, one of them chosen.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Dropdown.type
A field's text: whichever came last, the typing or a change of put, so that a field may be cleared or filled from outside without a Var.
A field's text: whichever came last, the typing or a change of put, so that a field may be cleared or filled from outside without a Var.
Value parameters
- put
-
The text put in the field from outside, as when it is cleared once sent.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Slides the elements a change moves from where they were drawn into their new places, rather than letting them jump there: where each stood is read before the change and again once it is laid out, and each that moved is drawn from where it stood and slid home. Elements are matched by keys of the caller's, so that one drawn afresh slides as the one it replaced. A block slides by transform; an inline element, which takes none, by its offsets, so it must be position: relative. Nothing slides for a reader who would rather nothing moved of itself.
Slides the elements a change moves from where they were drawn into their new places, rather than letting them jump there: where each stood is read before the change and again once it is laid out, and each that moved is drawn from where it stood and slid home. Elements are matched by keys of the caller's, so that one drawn afresh slides as the one it replaced. A block slides by transform; an inline element, which takes none, by its offsets, so it must be position: relative. Nothing slides for a reader who would rather nothing moved of itself.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Glide.type
Hands text shown for reading back to the field editing it the moment the reader types. The field takes the focus while the keystroke is still being handled, so that the keystroke itself lands in it.
Hands text shown for reading back to the field editing it the moment the reader types. The field takes the focus while the keystroke is still being handled, so that the keystroke itself lands in it.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Handover.type
A colour by hue, saturation and value. Unlike a #rrggbb code, it keeps its hue while grey.
A colour by hue, saturation and value. Unlike a #rrggbb code, it keeps its hue while grey.
Value parameters
- hue
-
The hue, in degrees, from
0to360. - saturation
-
The saturation, from
0to1. - value
-
The value, from
0(black) to1.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A drop-down menu, closed by a choice, a click elsewhere, or Escape. Its own clicks never reach the document, so opening one never closes it.
A drop-down menu, closed by a choice, a click elsewhere, or Escape. Its own clicks never reach the document, so opening one never closes it.
Drawn as .lc-menu, its button .lc-menu-toggle, the list .lc-menu-list and its choices .lc-menu-item.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Menu.type
A number typed into a field, or stepped by the arrows forming its end, which repeat while held, in place of the browser's own, which differ from browser to browser. The arrows reach the field as typing would, by input and change.
A number typed into a field, or stepped by the arrows forming its end, which repeat while held, in place of the browser's own, which differ from browser to browser. The arrows reach the field as typing would, by input and change.
Drawn as .lc-number-input, the field within it, and its arrows .lc-number-steps in .lc-number-steps, each icon a .lc-number-arrow. The arrows' width is --lc-number-steps, which a width given the box should add to the number's room: calc(5em + var(--lc-number-steps)).
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
NumberInput.type
A count of what awaits the reader, shown beyond the page while it is not 0: before the page's title, in red on the tab's icon, and on an installed app's icon in the taskbar or dock.
A count of what awaits the reader, shown beyond the page while it is not 0: before the page's title, in red on the tab's icon, and on an installed app's icon in the taskbar or dock.
Value parameters
- icon
-
The URL of the page's icon, which the count is drawn over.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
A row of a list being dragged into a new place, against the rows as they lay when the drag began, the rows it passes moving aside to make room.
A row of a list being dragged into a new place, against the rows as they lay when the drag began, the rows it passes moving aside to make room.
Value parameters
- from
-
The dragged row's place.
- offset
-
How far down it has been dragged, in pixels (up where negative).
- rows
-
Each row's extent down the page, in order.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
Reordering.type
Requests made from event handlers, each followed only until it answers.
Requests made from event handlers, each followed only until it answers.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Requests.type
Requests whose response is read line by line as it arrives.
Requests whose response is read line by line as it arrives.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Streaming.type
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Stylesheet.type
A stylesheet written in Scala (Css), kept beside the view it styles and given to the view's element as a modifier: the first element given it adds it to the page's head, where it stays.
A stylesheet written in Scala (Css), kept beside the view it styles and given to the view's element as a modifier: the first element given it adds it to the page's head, where it stays.
Value parameters
- blocks
-
Its rules, in order.
- layer
-
The cascade layer its rules go in, if any. Rules in no layer outweigh those in any layer, whatever their selectors, so that a page restyles a layered component without matching its selectors.
Attributes
- Companion
- object
- Supertypes
-
trait Modifier[Base]class Objecttrait Matchableclass Any
An on/off setting: a checkbox, drawn as a slider (.lc-switch, its slider .lc-switch-track) with the switch role, or as a tick box (.lc-check).
An on/off setting: a checkbox, drawn as a slider (.lc-switch, its slider .lc-switch-track) with the switch role, or as a tick box (.lc-check).
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Switch.type
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.
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
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Tabs.type
Offsets in the text of an element, read from points on the screen and from the page's selection, and where a caret at one stands: what a field drawn over rendered text, or a highlighter, needs to know where the reader is. The text of elements matching aside, such as notes drawn between the words, is no part of the element's own, so it is skipped, a point within it counting as where it stands.
Offsets in the text of an element, read from points on the screen and from the page's selection, and where a caret at one stands: what a field drawn over rendered text, or a highlighter, needs to know where the reader is. The text of elements matching aside, such as notes drawn between the words, is no part of the element's own, so it is skipped, a point within it counting as where it stands.
Value parameters
- aside
-
The selector of the elements whose text is skipped.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
The custom properties the components are coloured and shaped by, each with a default. A page sets them to its own, usually on :root:
The custom properties the components are coloured and shaped by, each with a default. A page sets them to its own, usually on :root:
Stylesheet(rule(":root")(Theme.accent := "#0b7a75", Theme.radius := "4px"))
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Theme.type
Something that opens and closes, such as a menu or a popover, folded from every cause of either.
Something that opens and closes, such as a menu or a popover, folded from every cause of either.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Toggle.type
The page's one tooltip, for every hint in place of title, which opens late and cannot be styled. A single host at the root draws it, so that no ancestor can clip it. It opens at once on hover, keyboard focus or a tap, beside the line of its element nearest the pointer, in the element's language.
The page's one tooltip, for every hint in place of title, which opens late and cannot be styled. A single host at the root draws it, so that no ancestor can clip it. It opens at once on hover, keyboard focus or a tap, beside the line of its element nearest the pointer, in the element's language.
Drawn as .lc-tooltip ([data-side='below'] when below its element), its content in a .lc-tooltip-body, a plain hint a .lc-tooltip-text.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Tooltip.type
Whether an element is on the page, as a signal decides.
Whether an element is on the page, as a signal decides.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Visible.type
The writes this client makes to one part of the server's state, kept so that a read of that part never undoes an edit made here:
The writes this client makes to one part of the server's state, kept so that a read of that part never undoes an edit made here:
- A read is used only if no write began while it was on its way, nor was on its way when it began. Otherwise it is read again once the writes are done (settled).
- A value read replaces the one on screen only where that is what the server was last known to hold; otherwise it is an edit not yet sent.
Values are recorded against the thing they belong to, usually the Var holding them, compared by identity.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any