Documentation

directionGo to source

The four directions into which content can be laid out.

Possible values are:

These values are available globally and also in the direction type’s scope, so you can write either of the following two:

#stack(dir: rtl)[A][B][C]
#stack(dir: direction.rtl)[A][B][C]

Definitions
Question mark

fromGo to source

Returns a direction from a starting point.

ExpandView example
#direction.from(left) \
#direction.from(right) \
#direction.from(top) \
#direction.from(bottom)
direction.from(alignment) → direction

side
alignment
RequiredPositional
Question mark

toGo to source

Returns a direction from an end point.

ExpandView example
#direction.to(left) \
#direction.to(right) \
#direction.to(top) \
#direction.to(bottom)
direction.to(alignment) → direction

side
alignment
RequiredPositional
Question mark

axisGo to source

The axis this direction belongs to, either "horizontal" or "vertical".

ExpandView example
#ltr.axis() \
#ttb.axis()
self.axis() → str

signGo to source

The corresponding sign, for use in calculations.

ExpandView example
#ltr.sign() \
#rtl.sign() \
#ttb.sign() \
#btt.sign()
self.sign() → int

startGo to source

The start point of this direction, as an alignment.

ExpandView example
#ltr.start() \
#rtl.start() \
#ttb.start() \
#btt.start()
self.start() → alignment

endGo to source

The end point of this direction, as an alignment.

ExpandView example
#ltr.end() \
#rtl.end() \
#ttb.end() \
#btt.end()
self.end() → alignment

invGo to source

The inverse direction.

ExpandView example
#ltr.inv() \
#rtl.inv() \
#ttb.inv() \
#btt.inv()
self.inv() → direction