DesignHelpers
The design module's non-component exports (hooks, functions, constants), which the generator does not type.
type DesignHelpers = { … }Members
(color: string, amount: number) => stringReturns color brightened by amount.
Discord's theme-aware style factory; see CreateStyles.
(color: string, amount: number) => stringReturns color darkened by amount.
(key: string) => voidCloses the alert opened under key.
Closes every open alert.
(color: string) => stringReturns a colour that contrasts with color, for content drawn on it.
Closes the open context menu, such as after a plugin's menu item runs.
DiscordFunction<void>Opens an alert as openAlert(key, element); pass the same key to dismissAlert to close it.
(color: string, opacity: number) => stringReturns color with its opacity set to opacity.
Shows a confirm modal from { title, content, confirmText, cancelText, onConfirm }.
Shows an action sheet from { key, header: { title }, options: [{ label, icon, onPress }] }.
Record<TextVariant, TextStyle>The text style Discord uses for each typography variant.
EnumLike<typeof THEME_FLAG_KEYS>Discord's theme flag enum: gradient themes, reduced or increased contrast, and reduced saturation.
EnumLike<typeof TRANSITION_STATE_KEYS>Discord's transition state enum; see TransitionState.
Hook that builds the state a SegmentedControl and its SegmentedControlPages share.
(token: SemanticColorToken) => stringHook that resolves a semantic colour token, such as Theme.colors.TEXT_DEFAULT, to a colour for the current theme.
Record<"NonText" | "Text" | "HighContrastText", number>The minimum WCAG contrast ratios Discord applies to non-text, text and high-contrast text.