tyrian

package tyrian

Type members

Classlikes

object Aria extends AriaAttributes

Object used to provide Aria attribute syntax import tyrian.Aria.*

Object used to provide Aria attribute syntax import tyrian.Aria.*

sealed trait Attr[+M]

HTML attribute

HTML attribute

final case class Attribute(name: String, value: String) extends Attr[Nothing]

Attribute of an HTML tag

Attribute of an HTML tag

Attributes are like properties, but can be removed. This is important for attributes like disabled, hidden, selected where there is no value, they are present and therefore set, or absent and unset.

Companion:
object
object Attribute
Companion:
class
object CSS
sealed trait Cmd[+F[_], +Msg]

A command describes some side-effect to perform.

A command describes some side-effect to perform.

Companion:
object
object Cmd
Companion:
class
sealed trait Elem[+M]

An HTML element can be a tag or a text node

An HTML element can be a tag or a text node

case object EmptyAttribute extends Attr[Nothing]

An attribute of an HTML tag that does not exist, used as a "do not render" placeholder

An attribute of an HTML tag that does not exist, used as a "do not render" placeholder

final case class Event[E <: Event, M](name: String, msg: E => M) extends Attr[M]

Event handler

Event handler

Value parameters:
msg

Message to produce when the event is triggered

name

Event name (e.g. "click")

object HotReload

A very simple mechanism to allow automatic loading and saving of your applications model to local storage. Uses:

A very simple mechanism to allow automatic loading and saving of your applications model to local storage. Uses:

  • During development, allows you to carry on where you left off between site rebuilds.
  • Acts as a user session, to remember where a website/app visitor/user was when they left.
sealed trait Html[+M] extends Elem[M]

Base class for HTML tags

Base class for HTML tags

Companion:
object
object Html extends HtmlTags with HtmlAttributes

Object used to provide Html syntax import tyrian.Html.*

Object used to provide Html syntax import tyrian.Html.*

Companion:
class
trait HtmlTags
final case class NamedAttribute(name: String) extends Attr[Nothing]

An attribute of an HTML tag that only has a name, no value

An attribute of an HTML tag that only has a name, no value

object Navigation

Provides simple routing based on url hash (anchor), such as: http://mysite.com/#page1

Provides simple routing based on url hash (anchor), such as: http://mysite.com/#page1

final case class Property(name: String, value: String) extends Attr[Nothing]

Property of a DOM node instance

Property of a DOM node instance

Properties are a type of attribute that can only be set, not removed.

Companion:
object
object Property
Companion:
class
object SVG extends SVGTags with SVGAttributes

Object used to provide SVG syntax import tyrian.SVG.*

Object used to provide SVG syntax import tyrian.SVG.*

trait SVGTags
object Style
sealed trait Sub[+F[_], +Msg]

A subscription describes a resource that an application is interested in.

A subscription describes a resource that an application is interested in.

Examples:

  • a timeout notifies its subscribers when it expires,
  • a video being played notifies its subscribers with subtitles.
Type parameters:
Msg

Type of message produced by the resource

Companion:
object
object Sub
Companion:
class
final case class Tag[+M](name: String, attributes: List[Attr[M]], children: List[Elem[M]]) extends Html[M]

An HTML tag

An HTML tag

final case class Text(value: String) extends Elem[Nothing]

A text node

A text node

object Tyrian
trait TyrianApp[Msg, Model] extends TyrianAppF[IO, Msg, Model]

The TyrianApp trait can be extended to conveniently prompt you for all the methods needed for a Tyrian app, as well as providing a number of standard app launching methods.

The TyrianApp trait can be extended to conveniently prompt you for all the methods needed for a Tyrian app, as well as providing a number of standard app launching methods.

trait TyrianAppF[F[_], Msg, Model]

The TyrianApp trait can be extended to conveniently prompt you for all the methods needed for a Tyrian app, as well as providing a number of standard app launching methods.

The TyrianApp trait can be extended to conveniently prompt you for all the methods needed for a Tyrian app, as well as providing a number of standard app launching methods.

final class TyrianIndigoBridge[F[_], A]
Companion:
object
Companion:
class
final case class TyrianSubSystem[F[_], A](indigoGameId: Option[IndigoGameId], bridge: TyrianIndigoBridge[F, A])(implicit evidence$1: Async[F]) extends SubSystem
Companion:
object
Companion:
class
object syntax

Types

opaque type IndigoGameId
opaque type Style