Update branding theme - Auth0 Docs
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.branding.themes.update("themeId", {
borders: {
button_border_radius: 1.1,
button_border_weight: 1.1,
buttons_style: "pill",
input_border_radius: 1.1,
input_border_weight: 1.1,
inputs_style: "pill",
show_widget_shadow: true,
widget_border_weight: 1.1,
widget_corner_radius: 1.1,
},
colors: {
body_text: "body_text",
error: "error",
header: "header",
icons: "icons",
input_background: "input_background",
input_border: "input_border",
input_filled_text: "input_filled_text",
input_labels_placeholders: "input_labels_placeholders",
links_focused_components: "links_focused_components",
primary_button: "primary_button",
primary_button_label: "primary_button_label",
secondary_button_border: "secondary_button_border",
secondary_button_label: "secondary_button_label",
success: "success",
widget_background: "widget_background",
widget_border: "widget_border",
},
fonts: {
body_text: {
bold: true,
size: 1.1,
},
buttons_text: {
bold: true,
size: 1.1,
},
font_url: "font_url",
input_labels: {
bold: true,
size: 1.1,
},
links: {
bold: true,
size: 1.1,
},
links_style: "normal",
reference_text_size: 1.1,
subtitle: {
bold: true,
size: 1.1,
},
title: {
bold: true,
size: 1.1,
},
},
page_background: {
background_color: "background_color",
background_image_url: "background_image_url",
page_layout: "center",
},
widget: {
header_text_alignment: "center",
logo_height: 1.1,
logo_position: "center",
logo_url: "logo_url",
social_buttons_layout: "bottom",
},
});
}
main();
package example
import (
context "context"
management "github.com/auth0/go-auth0/v3/management"
client "github.com/auth0/go-auth0/v3/management/client"
option "github.com/auth0/go-auth0/v3/management/option"
)
func do() {
mgmt, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &management.UpdateBrandingThemeRequestContent{
Borders: &management.BrandingThemeBorders{
ButtonBorderRadius: 1.1,
ButtonBorderWeight: 1.1,
ButtonsStyle: management.BrandingThemeBordersButtonsStyleEnumPill,
InputBorderRadius: 1.1,
InputBorderWeight: 1.1,
InputsStyle: management.BrandingThemeBordersInputsStyleEnumPill,
ShowWidgetShadow: true,
WidgetBorderWeight: 1.1,
WidgetCornerRadius: 1.1,
},
Colors: &management.BrandingThemeColors{
BodyText: "body_text",
Error: "error",
Header: "header",
Icons: "icons",
InputBackground: "input_background",
InputBorder: "input_border",
InputFilledText: "input_filled_text",
InputLabelsPlaceholders: "input_labels_placeholders",
LinksFocusedComponents: "links_focused_components",
PrimaryButton: "primary_button",
PrimaryButtonLabel: "primary_button_label",
SecondaryButtonBorder: "secondary_button_border",
SecondaryButtonLabel: "secondary_button_label",
Success: "success",
WidgetBackground: "widget_background",
WidgetBorder: "widget_border",
},
Fonts: &management.BrandingThemeFonts{
BodyText: &management.BrandingThemeFontBodyText{
Bold: true,
Size: 1.1,
},
ButtonsText: &management.BrandingThemeFontButtonsText{
Bold: true,
Size: 1.1,
},
FontURL: "font_url",
InputLabels: &management.BrandingThemeFontInputLabels{
Bold: true,
Size: 1.1,
},
Links: &management.BrandingThemeFontLinks{
Bold: true,
Size: 1.1,
},
LinksStyle: management.BrandingThemeFontLinksStyleEnumNormal,
ReferenceTextSize: 1.1,
Subtitle: &management.BrandingThemeFontSubtitle{
Bold: true,
Size: 1.1,
},
Title: &management.BrandingThemeFontTitle{
Bold: true,
Size: 1.1,
},
},
PageBackground: &management.BrandingThemePageBackground{
BackgroundColor: "background_color",
BackgroundImageURL: "background_image_url",
PageLayout: management.BrandingThemePageBackgroundPageLayoutEnumCenter,
},
Widget: &management.BrandingThemeWidget{
HeaderTextAlignment: management.BrandingThemeWidgetHeaderTextAlignmentEnumCenter,
LogoHeight: 1.1,
LogoPosition: management.BrandingThemeWidgetLogoPositionEnumCenter,
LogoURL: "logo_url",
SocialButtonsLayout: management.BrandingThemeWidgetSocialButtonsLayoutEnumBottom,
},
}
mgmt.Branding.Themes.Update(
context.TODO(),
"themeId",
request,
)
}