item_align: Flex align self

View source: R/item-align.R

item_alignR Documentation

Flex align self

Description

The item_align() function adjusts

Usage

item_align(x, ...)

Arguments

x

A tag element or .style pronoun.

...

A character string specifying an alignment. One of,

  • "start"

  • "end"

  • "center"

  • "baseline"

  • "stretch"

    Use name-value pairs to specify breakpoints.

Value

An object of the same type as x.

See Also

Other flex utilities: flex_align(), flex_content(), flex_direction(), flex_display(), flex_justify(), flex_wrap(), item_fill(), item_grow(), item_order()

Examples


library(htmltools)

div(
  .style %>%
    flex_display() %>%
    flex_align("end"),
  div("Flex item"),
  div(
    .style %>%
      item_align("start"),
    "Flex item (self aligned)"
  ),
  div("Flex item")
)


cascadess documentation built on Oct. 30, 2024, 9:29 a.m.