item_grow: Flex grow and shrink

View source: R/item-grow.R

item_growR Documentation

Flex grow and shrink

Description

The item_grow() and item_shrink() adjust a tag element's ability to grow or shrink inside a flex element.

Usage

item_grow(x, ...)

item_shrink(x, ...)

Arguments

x

A tag element or .style pronoun.

...

A boolean specifying to grow or shrink. One of,

  • TRUE

  • FALSE

    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_align(), item_fill(), item_order()

Examples


library(htmltools)

div(
  .style %>%
    flex_display(),
  div(
    .style %>%
      padding_all(2) %>%
      item_grow(TRUE),
    "Flex item"
  ),
  div(
    .style %>%
      padding_all(2),
    "Flex item"
  ),
  div(
    .style %>%
      padding_all(2),
    "Flex item"
  )
)


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