quarto_website {figma}R Documentation

A representation of a Quarto Website home webpage

Description

The 'quarto_website' object contain the data of the homepage for a Quarto Website that was drawn in a Figma file. In other words, a homepage was drawn in Figma, and then, it was imported to R trough the figma package.

Usage

quarto_website

Format

An object of class response, produced by httr HTTP methods (e.g. httr::GET());

Details

This Figma file contains a single page/canvas, and each HTML component is a separate object in the Figma file. The name of each object in the page/canvas correspond to the CSS selector used to style this HTML component in a real Quarto Website.

This is a interesting structure, because you can use the name and the attributes of each object to build custom CSS code, that maybe matches the style of a webpage.

Is worth mentioning, that the quarto_website object is a httr::response object returned by figma::get_figma_file(). This httr::response object is just a simple R list with class response. The elements of this list and their description are:

All data of the Figma file is stored in the content element. However, this data is in raw format (i.e. in raw bytes). To convert these raw bytes into a useful format like a R list, or a string, you should use the httr::content() function. See vignette("figma") for a detailed description of the data present in this content element;

Examples

library(figma)
str(quarto_website)

[Package figma version 0.2.0 Index]