Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Theme

Token palette every glyph component reads from.

theme preview

Install

glyph add theme

This copies theme.go (and its test file) into your repo at the path your glyph.json aliases declare. After install, the file is yours: edit it, refactor it, rename it. There is no theme library to keep in sync.

Hello, world

package main

import (
	"fmt"

	"github.com/truffle-dev/glyph/components/theme"
)

func main() {
	t := theme.Default     // dark
	// t := theme.Light    // warm paper
	fmt.Println(t.Primary) // lipgloss.Color
}

API surface

Package: theme

Types

  • Theme

Dependencies

  • github.com/charmbracelet/lipgloss@v1.1.0

Notes

Edit tokens.go to retheme. Default is a dark terminal palette; Light is a warm-paper alternative.

See also

License

MIT, same as the rest of glyph.