Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:FlowiseAI Flowise Typography

From Leeroopedia
Revision as of 11:17, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/FlowiseAI_Flowise_Typography.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains Theming, Typography
Last Updated 2026-02-12 07:00 GMT

Overview

themeTypography is a theme configuration function that defines the complete typography scale and custom text-related style variants for the Flowise MUI theme.

Description

This function accepts a theme customization object and returns a typography configuration covering standard MUI variants (h1-h6, subtitle1, subtitle2, caption, body1, body2, button) as well as custom Flowise-specific variants (customInput, mainContent, menuCaption, subMenuCaption, commonAvatar, smallAvatar, mediumAvatar, largeAvatar). Font sizes range from 0.6875rem (subMenuCaption) to 2.125rem (h1), and the function uses the theme's customization.fontFamily for the base font family and customization.borderRadius for layout variants.

Usage

Call this function during MUI theme construction, passing the theme options object, and use the returned value as the typography property of createTheme. The custom variants (mainContent, commonAvatar, etc.) can be referenced via theme.typography.mainContent in styled components or the sx prop.

Code Reference

Source Location

Signature

export default function themeTypography(theme) {
    return {
        fontFamily: theme?.customization?.fontFamily,
        h1: { ... },
        h2: { ... },
        h3: { ... },
        h4: { ... },
        h5: { ... },
        h6: { ... },
        subtitle1: { ... },
        subtitle2: { ... },
        caption: { ... },
        body1: { ... },
        body2: { ... },
        button: { ... },
        customInput: { ... },
        mainContent: { ... },
        menuCaption: { ... },
        subMenuCaption: { ... },
        commonAvatar: { ... },
        smallAvatar: { ... },
        mediumAvatar: { ... },
        largeAvatar: { ... }
    }
}

Import

import themeTypography from '@/themes/typography'

I/O Contract

Inputs

Name Type Required Description
theme object Yes Theme customization object containing customization (fontFamily, borderRadius), heading, textDark, darkTextPrimary, darkTextSecondary, grey500, and background properties

Outputs

Name Type Description
(return value) object A typography configuration object containing standard MUI variants (h1-h6, body1, body2, subtitle1, subtitle2, caption, button) and custom variants (customInput, mainContent, menuCaption, subMenuCaption, commonAvatar, smallAvatar, mediumAvatar, largeAvatar)

Usage Examples

Basic Usage

import { createTheme } from '@mui/material/styles'
import themeTypography from '@/themes/typography'

const themeOptions = {
    customization: { fontFamily: `'Roboto', sans-serif`, borderRadius: 12 },
    heading: '#333',
    textDark: '#111',
    // ...other options
}

const theme = createTheme({
    typography: themeTypography(themeOptions),
    // ...other theme config
})

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment