stack_vertical: Quick flex layouts

View source: R/stack-vertical.R

stack_verticalR Documentation

Quick flex layouts

Description

The stack_vertical() and stack_horizontal() functions are shortcuts for creating vertical and horizontal flex layouts.

Usage

stack_vertical(x)

stack_horizontal(x)

Arguments

x

A tag element or .style pronoun.

Value

An object of the same type as x.

Examples


library(htmltools)

div(
  .style %>%
    stack_vertical() %>%
    gap_all(3),
  p(
    .style %>%
      border_all() %>%
      padding_all(2),
    "First item"
  ),
  p(
    .style %>%
      border_all() %>%
      padding_all(2),
    "Second item"
  ),
  p(
    .style %>%
      border_all() %>%
      padding_all(2),
    "Third item"
  )
)

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