circletype: Apply a curvature on text elements

Description Usage Arguments Value Examples

View source: R/circletype.R

Description

Apply a curvature on text elements

Usage

1
circletype(ui_element, dir = 1, radius = 200)

Arguments

ui_element

Text element on which the curvature should be applied. Must be something like ‘h1()', 'h2()', etc. This element MUST have an id. Doesn’t work on other HTML elements such as buttons.

dir

Sets the text direction, must be equal to 1 (clockwise) or -1 (counter-clockwise).

radius

Sets the desired text radius. The lower the value, the more curved the text.

Value

A curved text.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
if (interactive()) {
library(shiny)

ui <- fluidPage(
  use_circletype(), # load dependencies
  circletype(h1("this is a title", id = "test_h1"), dir = -1, radius = 200)
)

server <- function(input, output, session) {}

shinyApp(ui, server)
}

circletyper documentation built on July 17, 2021, 5:06 p.m.