Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
Apply makes the frame use Lobe UI's light or dark theme, following the system's appearance.
func ColorTokenNames ¶
func ColorTokenNames() []string
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is a light and a dark set of tokens that a window applies in place of Lobe UI's defaults, such as tokens generated from an app's own brand. Make it once with NewConfig and apply it at the top of each view; the components inside then draw with its tokens.
func Default ¶
func Default() *Config
Default returns the Config of Lobe UI's own tokens, which Apply uses.
func NewConfig ¶
NewConfig makes a Config from a light and a dark set of tokens. Their Dark fields are set to match. Keep the Config for the life of the app rather than making one for each frame: every Config is remembered.
func (*Config) Apply ¶
Apply makes the frame use the Config's light or dark theme, following the system's appearance.
type Elevation ¶
type Elevation int
Elevation is one of Lobe UI's shadows: BoxShadow for dialogs, BoxShadowSecondary for popovers and menus, BoxShadowTertiary for tooltips.
type Tokens ¶
type Tokens struct {
Dark bool
Blue ui.Color
BlueActive ui.Color
BlueFillQuaternary ui.Color
BlueFillTertiary ui.Color
BgBase ui.Color
BgBlur ui.Color
BgContainer ui.Color
BgContainerDisabled ui.Color
BgContainerSecondary ui.Color
BgElevated ui.Color
BgLayout ui.Color
BgMask ui.Color
BgSolid ui.Color
BgSolidActive ui.Color
BgSolidHover ui.Color
BgSpotlight ui.Color
BgTextActive ui.Color
BgTextHover ui.Color
Border ui.Color
BorderBg ui.Color
BorderDisabled ui.Color
BorderSecondary ui.Color
Error ui.Color
ErrorActive ui.Color
ErrorAffix ui.Color
ErrorBg ui.Color
ErrorBgActive ui.Color
ErrorBgFilledHover ui.Color
ErrorBgHover ui.Color
ErrorBorder ui.Color
ErrorBorderHover ui.Color
ErrorFill ui.Color
ErrorFillQuaternary ui.Color
ErrorFillSecondary ui.Color
ErrorFillTertiary ui.Color
ErrorHover ui.Color
ErrorOutline ui.Color
ErrorText ui.Color
ErrorTextActive ui.Color
ErrorTextHover ui.Color
Fill ui.Color
FillAlter ui.Color
FillContent ui.Color
FillContentHover ui.Color
FillQuaternary ui.Color
FillSecondary ui.Color
FillTertiary ui.Color
Highlight ui.Color
Icon ui.Color
IconHover ui.Color
Info ui.Color
InfoActive ui.Color
InfoBg ui.Color
InfoBgHover ui.Color
InfoBorder ui.Color
InfoBorderHover ui.Color
InfoFill ui.Color
InfoFillQuaternary ui.Color
InfoFillSecondary ui.Color
InfoFillTertiary ui.Color
InfoHover ui.Color
InfoText ui.Color
InfoTextActive ui.Color
InfoTextHover ui.Color
Link ui.Color
LinkActive ui.Color
LinkHover ui.Color
Primary ui.Color
PrimaryActive ui.Color
PrimaryBg ui.Color
PrimaryBgHover ui.Color
PrimaryBorder ui.Color
PrimaryBorderHover ui.Color
PrimaryFill ui.Color
PrimaryFillQuaternary ui.Color
PrimaryFillSecondary ui.Color
PrimaryFillTertiary ui.Color
PrimaryHover ui.Color
PrimaryText ui.Color
PrimaryTextActive ui.Color
PrimaryTextHover ui.Color
Shadow ui.Color
Split ui.Color
Success ui.Color
SuccessActive ui.Color
SuccessBg ui.Color
SuccessBgHover ui.Color
SuccessBorder ui.Color
SuccessBorderHover ui.Color
SuccessFill ui.Color
SuccessFillQuaternary ui.Color
SuccessFillSecondary ui.Color
SuccessFillTertiary ui.Color
SuccessHover ui.Color
SuccessText ui.Color
SuccessTextActive ui.Color
SuccessTextHover ui.Color
Text ui.Color
TextBase ui.Color
TextDescription ui.Color
TextDisabled ui.Color
TextHeading ui.Color
TextLabel ui.Color
TextLightSolid ui.Color
TextPlaceholder ui.Color
TextQuaternary ui.Color
TextSecondary ui.Color
TextTertiary ui.Color
Warning ui.Color
WarningActive ui.Color
WarningAffix ui.Color
WarningBg ui.Color
WarningBgHover ui.Color
WarningBorder ui.Color
WarningBorderHover ui.Color
WarningFill ui.Color
WarningFillQuaternary ui.Color
WarningFillSecondary ui.Color
WarningFillTertiary ui.Color
WarningHover ui.Color
WarningOutline ui.Color
WarningText ui.Color
WarningTextActive ui.Color
WarningTextHover ui.Color
White ui.Color
Cyan ui.Color
CyanActive ui.Color
CyanFillQuaternary ui.Color
CyanFillTertiary ui.Color
Geekblue ui.Color
Geekblue8 ui.Color
Geekblue9 ui.Color
GeekblueActive ui.Color
GeekblueFillQuaternary ui.Color
GeekblueFillTertiary ui.Color
Gold ui.Color
GoldActive ui.Color
GoldFillQuaternary ui.Color
GoldFillTertiary ui.Color
Gray ui.Color
Gray10 ui.Color
Gray11 ui.Color
Gray7 ui.Color
Gray9 ui.Color
GrayActive ui.Color
GrayFillQuaternary ui.Color
GrayFillTertiary ui.Color
Green ui.Color
GreenActive ui.Color
GreenFillQuaternary ui.Color
GreenFillTertiary ui.Color
Lime ui.Color
LimeActive ui.Color
LimeFillQuaternary ui.Color
LimeFillTertiary ui.Color
Magenta ui.Color
Magenta8 ui.Color
Magenta9 ui.Color
MagentaActive ui.Color
MagentaFillQuaternary ui.Color
MagentaFillTertiary ui.Color
Orange ui.Color
Orange9 ui.Color
OrangeActive ui.Color
OrangeFillQuaternary ui.Color
OrangeFillTertiary ui.Color
PrimaryForeground ui.Color
Purple ui.Color
Purple8 ui.Color
Purple9 ui.Color
PurpleActive ui.Color
PurpleFillQuaternary ui.Color
PurpleFillTertiary ui.Color
Red ui.Color
RedActive ui.Color
RedFillQuaternary ui.Color
RedFillTertiary ui.Color
Volcano ui.Color
Volcano8 ui.Color
Volcano9 ui.Color
VolcanoActive ui.Color
VolcanoFillQuaternary ui.Color
VolcanoFillTertiary ui.Color
Yellow ui.Color
Yellow9 ui.Color
YellowActive ui.Color
YellowFillQuaternary ui.Color
YellowFillTertiary ui.Color
BorderRadius float32
BorderRadiusLG float32
BorderRadiusSM float32
BorderRadiusXS float32
ControlHeight float32
ControlHeightLG float32
ControlHeightSM float32
ControlHeightXS float32
FontSize float32
FontSizeHeading1 float32
FontSizeHeading2 float32
FontSizeHeading3 float32
FontSizeHeading4 float32
FontSizeHeading5 float32
FontSizeLG float32
FontSizeSM float32
FontSizeXL float32
FontWeightStrong float32
LineWidth float32
}
func TokensOf ¶
TokensOf returns a copy of the tokens of the theme the widgets being built take: those of the Config that made it, or Lobe UI's light or dark tokens for any other theme.
func (*Tokens) Elevate ¶
Elevate gives e the shadow of level and Lobe UI's one-pixel ring around it.