Skip to main content

Overview

Mantlz SDK includes four carefully designed built-in themes, each with automatic dark mode support. All themes are fully responsive and optimized for mobile-first design.

Default

Clean, minimal design with subtle shadows and rounded corners

Modern

Contemporary styling with soft shadows and refined aesthetics

Neobrutalism

Bold, high-contrast design with sharp edges and prominent borders

Simple

Minimal styling for maximum customization flexibility

Using Built-in Themes

Apply a theme using the theme prop on the Mantlz component:
import { Mantlz } from '@mantlz/nextjs';

export default function MyForm() {
  return (
    <Mantlz 
      formId="your-form-id" 
      theme="modern" 
    />
  );
}

Theme Configurations

Default Theme

The default theme provides a clean, professional appearance with subtle styling and smooth interactions.Key Features:
  • Rounded corners (10px border radius)
  • Subtle shadows and borders
  • Blue accent color (var(—blue-9))
  • Smooth transitions and hover effects
  • Backdrop blur effect
Visual Characteristics:
  • Container: White background with light gray border and soft shadow
  • Inputs: Medium border thickness (1.5px) with blue focus ring
  • Buttons: Blue background with lift animation on hover
  • Typography: Semi-bold titles (700 weight) with negative letter spacing
<Mantlz formId="your-form-id" theme="default" />
container: {
  maxWidth: "350px",
  width: "100%",
  margin: "0 auto",
  padding: "16px",
  borderRadius: "10px",
  border: "1px solid var(--gray-4)",
  boxShadow: "0 2px 8px rgba(0, 0, 0, 0.06)",
  backgroundColor: "white",
  backdropFilter: "blur(4px)"
}
Dark Mode:
  • Background: #1a1a1a
  • Border: var(—gray-8)
  • Button: Light gray (#f5f5f5) with black text

Dark Mode Support

All built-in themes include automatic dark mode support. The SDK detects the user’s system preference and applies the appropriate color scheme.

Dark Mode Features

  • Automatic detection of system color scheme
  • Seamless transitions between light and dark modes
  • Optimized contrast ratios for accessibility
  • Custom dark variants for all theme elements

Dark Mode Variations

Each theme includes specific dark mode configurations:
containerDark: {
  backgroundColor: "#1a1a1a",
  border: "1px solid var(--gray-8)",
  boxShadow: "0 2px 8px rgba(0, 0, 0, 0.3)"
}

buttonDark: {
  backgroundColor: "#f5f5f5",
  color: "black"
}

Theme Comparison

FeatureDefaultModernNeobrutalismSimple
Border Radius10px8px0px4px
Border Width1.5px1px2px1px
Shadow StyleSoftLayeredHard offsetNone
Font Weight700600800500
Accent ColorBlueBlackYellowGray
SpacingMediumMediumCompactMinimal
AnimationLiftVerticalPressBasic
TypographyStandardStandardUppercase/MonoStandard

Combining with Custom Appearance

You can use a built-in theme as a base and override specific elements:
<Mantlz
  formId="your-form-id"
  theme="modern"
  appearance={{
    variables: {
      colorPrimary: '#6366f1',
      borderRadius: '12px'
    },
    elements: {
      formButton: 'bg-indigo-600 hover:bg-indigo-700'
    }
  }}
/>
When both theme and appearance props are provided, the appearance settings will override the theme’s default styling.

Responsive Design

All themes are built with mobile-first responsive design:
  • Max Width: 350px for optimal form readability
  • Fluid Width: 100% width within max-width constraint
  • Touch-Friendly: Adequate padding and touch targets
  • Flexible Layout: Adapts to container size

Custom Themes

Create your own custom themes from scratch

Appearance API

Fine-tune styling with the appearance prop

Build docs developers (and LLMs) love