Enoria
  • Home
  • Guide
    • Getting Started
    • Hello world!
    • Widgets
      • Container
      • Column
      • Row
      • Form
      • GridBuilder
      • ListBuilder
      • TextLabel
      • TextButton
      • ImageLabel
      • ImageButton
      • PageLayout
      • ScrollContainer
      • Stack
      • TextBox
      • TextFormField
      • VerticalSpacer
      • HorizontalSpacer
      • Viewport
  • Events
  • State Management
    • Stores
    • Observer
  • Animations
  • Build forms with validation
  • Theming
    • Classes
Powered by GitBook
On this page

Was this helpful?

Theming

Learn how to change your project theme.

Head into your project, in style.Theme. This module contains a dictionnary with all the default properties that you want your widgets to have. Just add, as a key, the widget name followed with "Theme", and as a value, the properties. Here's an example:

local FONT = Enum.Font.GothamSemibold

local TEXTTHEME = {
	Font = FONT,
	TextColor3 = Color3.fromRGB(0, 0, 0)
}

local BACKGROUND_COLOR3 = Color3.fromRGB(255, 255, 255)

local Theme = {
	TextBoxTheme = {
		TextTheme = TEXTTHEME
	},
	TextButtonTheme = {
		BackgroundColor3 = Color3.fromRGB(0, 170, 0),
		TextTheme = TEXTTHEME
	},
	TextFormFieldTheme = {
		Size = UDim2.fromOffset(200, 25),
		TextTheme = TEXTTHEME
	},
	TextLabelTheme = {
		TextTheme = TEXTTHEME
	},
	ContainerTheme = {
		BackgroundColor3 = BACKGROUND_COLOR3
	}
}

return Theme
PreviousBuild forms with validationNextClasses

Last updated 4 years ago

Was this helpful?