lipgloss icon indicating copy to clipboard operation
lipgloss copied to clipboard

(v2) feat: add hyperlink support

Open aymanbagabas opened this issue 9 months ago • 1 comments

This commit adds support for hyperlinks in lipgloss. Hyperlinks are useful for rendering text that can be clicked on in a terminal emulator that supports hyperlinks.

Example:

package main

import (
	"fmt"

	"github.com/charmbracelet/lipgloss/v2"
)

func main() {
	// Underline and color hyperlink
	style := lipgloss.NewStyle().Underline(true).Foreground(lipgloss.Blue).Hyperlink("https://charm.sh")
	fmt.Println("Welcome to the", style.Render("Charm"), "website!")
}

aymanbagabas avatar Feb 12 '25 22:02 aymanbagabas

This could probably also benefit from an UnsetHyperlink test too.

meowgorithm avatar Feb 12 '25 23:02 meowgorithm