Avatar

com.raquo.laminar.shoelace.sl.Avatar
object Avatar extends WebComponent

Avatars are used to represent a person or object.

Avatar.scala source code

Shoelace Avatar docs

Attributes

Graph
Supertypes
class WebComponent
trait CommonTypes
class Object
trait Matchable
class Any
Self type
Avatar.type

Members list

Type members

Classlikes

trait AvatarComponent extends Object

Attributes

Supertypes
class Object
trait Any
class Object
trait Matchable
class Any
Self type
HTMLElement
object RawImport extends Object

Attributes

Supertypes
class Object
trait Any
class Object
trait Matchable
class Any
Self type
RawImport.type
object cssParts

For documentation only. You need to style these from a CSS stylesheet.

For documentation only. You need to style these from a CSS stylesheet.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
cssParts.type
object slots

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
slots.type

Types

type Ref = AvatarComponent & HTMLElement

Inherited types

type ComponentMod = Modifier[Element] | ModFunction

Attributes

Inherited from:
WebComponent
protected type DSP[V] = DerivedStyleProp[V]

Attributes

Inherited from:
CommonTypes
type Element = ReactiveHtmlElement[Ref]

Attributes

Inherited from:
WebComponent
type ModFunction = (WebComponent) => Modifier[Element]

Attributes

Inherited from:
WebComponent
protected type SS = StyleSetter

Attributes

Inherited from:
CommonTypes

Value members

Inherited methods

final def apply(mods: ComponentMod*): Element

Instantiate this component using the specified modifiers.

Instantiate this component using the specified modifiers.

Modifiers can be the usual Laminar modifiers (e.g. onDblClick --> observer), or they can be functions from this component to a modifier (e.g. _.onClick --> observer)

Scala 2 does not support union types, so use the of method instead.

IntelliJ is unable to provide autocompletion when using this method, so I suggest using of too. Upvote https://youtrack.jetbrains.com/issue/SCL-21713/Method-accepting-a-union-of-types-that-includes-a-Function-type-problems-with-go-to-definition-type-hints-and-autocomplete-Scala

Attributes

Inherited from:
WebComponent
protected def asIsProp[V](name: String): HtmlProp[V, _]

Attributes

Inherited from:
CommonTypes
protected def boolAttr(name: String): HtmlAttr[Boolean]

Attributes

Inherited from:
CommonTypes
protected def boolProp(name: String): HtmlProp[Boolean, _]

Attributes

Inherited from:
CommonTypes
protected def colorStyle(name: String): StyleProp[String] & Color & Color[SS, DSP]

Attributes

Inherited from:
CommonTypes
protected def doubleProp(name: String): HtmlProp[Double, _]

Attributes

Inherited from:
CommonTypes
protected def doubleStyle(key: String): StyleProp[Double]

Attributes

Inherited from:
CommonTypes
protected def eventProp[Ev <: Event](name: String): EventProp[Ev]

Attributes

Inherited from:
CommonTypes
protected def intAttr(name: String): HtmlAttr[Int]

Attributes

Inherited from:
CommonTypes
protected def intProp(name: String): HtmlProp[Int, _]

Attributes

Inherited from:
CommonTypes
protected def intStyle(key: String): StyleProp[Int]

Attributes

Inherited from:
CommonTypes
protected def lengthStyle(name: String): StyleProp[String] & Length[DSP, Int]

Attributes

Inherited from:
CommonTypes
protected def lineStyle(key: String): StyleProp[String] & Line

Attributes

Inherited from:
CommonTypes
final def of(mods: ModFunction*): Element

Instantiate this component with the specified modifiers.

Instantiate this component with the specified modifiers.

To pass standard Laminar modifiers with this method, use _ => onDblClick --> observer.

Same as apply, but only accepts scoped functions for modifiers.

Attributes

Inherited from:
WebComponent
def on[Ev <: Event, V](ev: EventProcessor[Ev, V]): EventProcessor[Ev, V]

Optional syntax for using built-in Laminar events: _.on(onDblClick.preventDefault) --> ...

Optional syntax for using built-in Laminar events: _.on(onDblClick.preventDefault) --> ...

Attributes

Inherited from:
WebComponent
protected def stringAttr(name: String): HtmlAttr[String]

Attributes

Inherited from:
CommonTypes
protected def stringProp(name: String): HtmlProp[String, _]

Attributes

Inherited from:
CommonTypes
protected def tagWithControlledInput[Ref <: Element, A, Ev <: Event](prop: HtmlProp[A, _], initial: A, eventProp: EventProp[Ev]): CustomHtmlTag[Ref]

Attributes

Inherited from:
WebComponent
protected def timeStyle(key: String): StyleProp[String] & Time[DSP]

Attributes

Inherited from:
CommonTypes
protected def useImport(importObject: Any): Unit

Attributes

Inherited from:
WebComponent

Concrete fields

lazy val image: HtmlAttr[String]

The image source to use for the avatar.

The image source to use for the avatar.

Attributes

lazy val initials: HtmlAttr[String]

Initials to use as a fallback when no image is available (1-2 characters max recommended).

Initials to use as a fallback when no image is available (1-2 characters max recommended).

Attributes

lazy val label: HtmlAttr[String]

A label to use to describe the avatar to assistive devices.

A label to use to describe the avatar to assistive devices.

Attributes

lazy val loading: HtmlAttr[String]

Indicates how the browser should load the image.

Indicates how the browser should load the image.

Attributes

lazy val shape: HtmlAttr[String]

The shape of the avatar.

The shape of the avatar.

Attributes

lazy val size: StyleProp[String] & Length[DSP, Int]

The size of the avatar.

The size of the avatar.

Attributes

Inherited fields

lazy protected val tag: CustomHtmlTag[Ref]

Attributes

Inherited from:
WebComponent