Ivandt logo

Theming

Customize the look and feel of Ivandt Importer to match your brand

Ivandt Importer is fully themeable using CSS variables. You can customize colors, borders, spacing, and more to match your brand identity.

Reference

Complete Variable List

VariableDescriptionDefault (Light)Default (Dark)
Base Colors
--ivt-color-baseMain background color#ffffff#020010
--ivt-color-base-contentText color on base backgrounds#020010#ffffff
Primary
--ivt-color-primaryMain action color (buttons, CTAs)#020010#f9fafb
--ivt-color-primary-contentText on primary backgrounds#ffffff#020010
Secondary
--ivt-color-secondarySupporting actions#1a2b4a#60a5fa
--ivt-color-secondary-contentText on secondary backgrounds#ffffff#020010
Accent
--ivt-color-accentHighlights and interactive states#3b82f6#3b82f6
--ivt-color-accent-contentText on accent backgrounds#ffffff#ffffff
Neutral
--ivt-color-neutralStructural elements#0f1540#0f1540
--ivt-color-neutral-contentText on neutral backgrounds#ffffff#e5e7eb
Info
--ivt-color-infoInformational messagesBlueLight Blue
--ivt-color-bg-infoInfo background (with opacity)Blue (20%)Light Blue (20%)
--ivt-color-info-contentText on info backgroundsNear WhiteDark Blue
Success
--ivt-color-successSuccess statesGreenLight Green
--ivt-color-bg-successSuccess background (with opacity)Green (20%)Light Green (20%)
--ivt-color-success-contentText on success backgroundsNear WhiteDark Green
Warning
--ivt-color-warningWarning statesOrangeLight Yellow
--ivt-color-bg-warningWarning background (with opacity)Orange (20%)Light Yellow (20%)
--ivt-color-warning-contentText on warning backgroundsNear WhiteDark Brown
Error
--ivt-color-errorError statesRedLight Red
--ivt-color-bg-errorError background (with opacity)Red (20%)Light Red (20%)
--ivt-color-error-contentText on error backgroundsNear WhiteDark Red
Layout
--ivt-radius-boxBorder radius for containers0.1rem0.1rem
--ivt-radius-fieldBorder radius for input fields0.1rem0.1rem
--ivt-radius-selectorBorder radius for dropdowns0.1rem0.1rem
--ivt-size-fieldHeight multiplier for fields0.25rem0.25rem
--ivt-size-selectorSize for selector elements0.25rem0.25rem
--ivt-borderBorder width1px1px
Dialog
--ivt-dialog-widthDialog width100%100%
--ivt-dialog-max-widthMaximum dialog width90vw90vw
--ivt-dialog-heightDialog height90vh90vh
--ivt-dialog-backdrop-blurBackdrop blur amount3px3px
--ivt-dialog-z-indexDialog stacking order99999999

You only need to override the variables you want to change. All others will use their default values.

Default Theme

The importer comes with a built-in dark navy blue and white theme that works in both light and dark modes.

Loading importer...
import { IvtSchema } from "@ivandt/importer";import { defaultSchemaProps } from "@/app/schemas/defaultSchemaProps";export const themeExampleSchema: IvtSchema = {  ...defaultSchemaProps,  key: "themeExampleSchema",  fields: [    {      type: "text",      label: "Product Name",      key: "productName",      order: 0,      validators: [{ type: "required" }],    },    {      type: "dropdown",      label: "Category",      key: "category",      order: 1,      options: [        { label: "Electronics", value: "electronics" },        { label: "Clothing", value: "clothing" },        { label: "Food", value: "food" },      ],    },    {      type: "numeric",      label: "Price",      key: "price",      order: 2,      validators: [{ type: "required" }, { type: "min", value: 0 }],    },  ],};

How Theming Works

Ivandt uses CSS variables (custom properties) that you can override.

Customizing Themes

Basic Customization

Override theme variables using CSS. Target the component with the data-selected-mode attribute:

/* Light mode customization */
ivt-importer[data-selected-mode='light'] {
  --ivt-color-primary: #your-brand-color;
  --ivt-color-primary-content: #ffffff;
}

/* Dark mode customization */
ivt-importer[data-selected-mode='dark'] {
  --ivt-color-primary: #your-brand-color;
  --ivt-color-primary-content: #000000;
}

The data-selected-mode attribute works with all Ivandt components: ivt-importer, ivt-importer-button, ivt-importer-dialog, and ivt-importer-page.

Complete Theme Example

Here's a complete custom theme with rounded corners and a green color scheme:

Loading importer...
import { IvtSchema } from "@ivandt/importer";import { defaultSchemaProps } from "@/app/schemas/defaultSchemaProps";export const themeExampleSchema: IvtSchema = {  ...defaultSchemaProps,  key: "themeExampleSchema",  fields: [    {      type: "text",      label: "Product Name",      key: "productName",      order: 0,      validators: [{ type: "required" }],    },    {      type: "dropdown",      label: "Category",      key: "category",      order: 1,      options: [        { label: "Electronics", value: "electronics" },        { label: "Clothing", value: "clothing" },        { label: "Food", value: "food" },      ],    },    {      type: "numeric",      label: "Price",      key: "price",      order: 2,      validators: [{ type: "required" }, { type: "min", value: 0 }],    },  ],};
ivt-importer[data-selected-mode='light'] {/* Base colors */--ivt-color-base: #ffffff;--ivt-color-base-content: #064e3b;/* Primary - main actions */--ivt-color-primary: #059669;--ivt-color-primary-content: #ffffff;/* Secondary - supporting actions */--ivt-color-secondary: #10b981;--ivt-color-secondary-content: #ffffff;/* Accent - highlights */--ivt-color-accent: #34d399;--ivt-color-accent-content: #064e3b;/* Rounded corners */--ivt-radius-box: 1rem;--ivt-radius-field: 0.5rem;--ivt-radius-selector: 0.5rem;}ivt-importer[data-selected-mode='dark'] {/* Base colors */--ivt-color-base: #064e3b;--ivt-color-base-content: #d1fae5;/* Primary - main actions */--ivt-color-primary: #34d399;--ivt-color-primary-content: #064e3b;/* Secondary - supporting actions */--ivt-color-secondary: #10b981;--ivt-color-secondary-content: #064e3b;/* Accent - highlights */--ivt-color-accent: #6ee7b7;--ivt-color-accent-content: #064e3b;/* Rounded corners */--ivt-radius-box: 1rem;--ivt-radius-field: 0.5rem;--ivt-radius-selector: 0.5rem;}

Best Practices

Start with Base Colors

Begin by setting --ivt-color-base and --ivt-color-base-content. These are the foundation of your theme.

ivt-importer[data-selected-mode='light'] {
  --ivt-color-base: #ffffff;
  --ivt-color-base-content: #1a1a1a;
}

Set Primary Color

Your primary color should be your brand color. This is used for main actions.

ivt-importer[data-selected-mode='light'] {
  --ivt-color-primary: #your-brand-color;
  --ivt-color-primary-content: #ffffff; /* Ensure good contrast */
}

Ensure Contrast

Always ensure sufficient contrast between colors and their content colors for accessibility.

  • Primary/content should have at least 4.5:1 contrast ratio
  • Base/content should have at least 4.5:1 contrast ratio
  • Use tools like WebAIM Contrast Checker

Test Both Modes

If you support both light and dark modes, test your theme in both to ensure consistency.

/* Light mode */
ivt-importer[data-selected-mode='light'] {
  --ivt-color-primary: #0066cc;
}

/* Dark mode */
ivt-importer[data-selected-mode='dark'] {
  --ivt-color-primary: #4da6ff;
}

Common Patterns

Brand Color Integration

Match your company's brand colors:

ivt-importer[data-selected-mode='light'] {
  --ivt-color-primary: #ff6b6b; /* Your brand red */
  --ivt-color-primary-content: #ffffff;
  --ivt-color-accent: #ffd93d; /* Your brand yellow */
  --ivt-color-accent-content: #1a1a1a;
}

Minimal Theme

Create a clean, minimal look with subtle colors:

ivt-importer[data-selected-mode='light'] {
  --ivt-color-base: #fafafa;
  --ivt-color-base-content: #2a2a2a;
  --ivt-color-primary: #2a2a2a;
  --ivt-color-primary-content: #ffffff;
  --ivt-color-secondary: #6b7280;
  --ivt-color-secondary-content: #ffffff;
  --ivt-radius-box: 0.25rem;
  --ivt-radius-field: 0.25rem;
}

Component-Specific Styling

Targeting Specific Components

Each Ivandt component can be styled independently:

/* Style only the dialog */
ivt-importer-dialog[data-selected-mode='light'] {
  --ivt-color-primary: #your-color;
}

/* Style only the button */
ivt-importer-button[data-selected-mode='light'] {
  --ivt-color-primary: #your-color;
}

/* Style only the page */
ivt-importer-page[data-selected-mode='light'] {
  --ivt-color-primary: #your-color;
}

Loading Styles

Inline Styles

For quick testing or dynamic themes:

<ivt-importer
  data-selected-mode="light"
  style="
    --ivt-color-primary: #your-color;
    --ivt-color-primary-content: #ffffff;
  "
></ivt-importer>

External Stylesheet

For production use, create a separate CSS file:

importer-theme.css
ivt-importer[data-selected-mode='light'] {
  --ivt-color-base: #ffffff;
  --ivt-color-base-content: #1a1a1a;
  --ivt-color-primary: #0066cc;
  --ivt-color-primary-content: #ffffff;
}

ivt-importer[data-selected-mode='dark'] {
  --ivt-color-base: #1a1a1a;
  --ivt-color-base-content: #ffffff;
  --ivt-color-primary: #4da6ff;
  --ivt-color-primary-content: #1a1a1a;
}

Then import it in your application:

<link rel="stylesheet" href="importer-theme.css">

Troubleshooting

Theme Not Applying

Make sure you're targeting the correct component with the data-selected-mode attribute.

/* ❌ Wrong - missing data-selected-mode */
ivt-importer {
  --ivt-color-primary: #your-color;
}

/* ✅ Correct */
ivt-importer[data-selected-mode='light'] {
  --ivt-color-primary: #your-color;
}

Visual Theme Designer

Don't want to write CSS by hand? Use our visual theme designer to create your perfect theme with a live preview.

Theme Designer

Features

The Ivandt Theme Designer at ivandt.com/design provides an intuitive interface for creating custom themes:

  • Live Preview - See your theme changes instantly on a real importer instance
  • Color Pickers - Visual color selection for all theme variables
  • Preset Themes - Start with professionally designed presets and customize from there
  • Real-time Updates - Watch the SDK update as you adjust colors and styles
  • Export Options:
    • Download as CSS file for immediate use
    • Save as your default theme for all templates
  • No Code Required - Perfect for designers and non-technical team members

How to Use

Visit the Designer

Go to ivandt.com/design and log in to your account.

Choose Your Starting Point

Start with a preset theme or create a custom design from scratch. Presets include popular color schemes that you can use as-is or customize.

Customize Colors

Use the color pickers to adjust:

  • Base colors (background and text)
  • Brand colors (primary, secondary, accent)
  • Semantic colors (info, success, warning, error)

The live preview updates instantly as you make changes.

Test with Real Data

Upload a sample file to see how your theme looks with actual data in the table view. This helps ensure your colors have proper contrast and readability.

Save or Download

Choose how to use your theme:

  • Download CSS - Get a ready-to-use CSS file with all your theme variables
  • Save as Default - Make this theme the default for all your templates

Benefits

The Theme Designer is the fastest way to create a custom theme without writing any code. It's perfect for:

  • Quickly matching your brand colors
  • Testing different color combinations
  • Creating themes for different clients or projects
  • Ensuring proper contrast and accessibility

Integration

Once you've downloaded your theme CSS file, integrate it into your application:

<!-- Add to your HTML -->
<link rel="stylesheet" href="path/to/your-theme.css">

<ivt-importer data-mode="light" schema={schema}></ivt-importer>

The downloaded CSS file contains all the necessary data-selected-mode selectors and variable overrides, ready to use immediately.