Title: 'Lucide' Icons for 'R'
Version: 0.1.0
Description: A lightweight wrapper for the 'Lucide' icon library https://lucide.dev. Embed beautiful and consistent 'SVG' icons inline in any 'R' web application.
License: MIT + file LICENSE
URL: https://github.com/hyperverse-r/lucidr
BugReports: https://github.com/hyperverse-r/lucidr/issues
Depends: R (≥ 3.5)
Imports: htmltools
Suggests: htmxr, plumber2, testthat (≥ 3.0.0)
Config/testthat/edition: 3
Encoding: UTF-8
RoxygenNote: 7.3.3
NeedsCompilation: no
Packaged: 2026-03-05 17:39:36 UTC; arthur
Author: Arthur Bréant [aut, cre]
Maintainer: Arthur Bréant <arthur@thinkr.fr>
Repository: CRAN
Date/Publication: 2026-03-10 11:30:02 UTC

Lucide icon

Description

Renders a 'Lucide' icon as an inline 'SVG' element.

Usage

lucide(
  name,
  size = 24,
  color = "currentColor",
  stroke_width = 2,
  class = NULL,
  ...
)

Arguments

name

Icon name (e.g. "chevron-right", "house", "settings"). See https://lucide.dev/icons/ for the full list.

size

Icon size in pixels. Applied to both width and height. Default 24.

color

Icon colour. Any valid CSS colour value. Default "currentColor" (inherits from parent element).

stroke_width

Stroke width. Default 2.

class

Additional CSS classes to add to the ⁠<svg>⁠ element.

...

Additional HTML attributes passed to the ⁠<svg>⁠ element.

Value

An htmltools::tags object (inline ⁠<svg>⁠).

Examples

lucide("house")
lucide("chevron-right", size = 16, color = "red")
lucide("settings", stroke_width = 1.5, class = "my-icon")


List available Lucide icons

Description

Returns the names of all icons bundled in this version of 'lucidr'.

Usage

lucide_list()

Value

A character vector of icon names.

Examples

head(lucide_list(), 10)
length(lucide_list())