5 min readUpdated Mar 2, 2026

SettingsForm Documentation for Vantage

Overview

The SettingsForm component is a generic settings interface used to manage various configurable options within the Vantage analytics and data platform. It is designed to be adaptable, allowing developers to pass in a schema that defines the fields to be displayed, initial values for those fields, and a callback function that is invoked whenever a setting's value changes. This enables dynamic interactions and real-time updates, which are crucial for maintaining an intuitive user experience.

Purpose

The primary purpose of the SettingsForm is to provide users with a seamless way to adjust application settings according to their needs. The component handles a variety of input types, including text fields, select dropdowns, checkboxes, and color pickers. By utilizing this form, organizations can tailor their analytics experience to specific requirements, enhancing their data utilization and insights.

Settings

The SettingsForm accepts the following structured settings through its schema prop:

1. Schema Definition

Example of Schema

javascript
const schema = [
    { key: 'theme', label: 'Theme', type: 'select', options: [{ value: 'light', label: 'Light' }, { value: 'dark', label: 'Dark' }] },
    { key: 'itemsPerPage', label: 'Items Per Page', type: 'number' },
    { key: 'notificationsEnabled', label: 'Enable Notifications', type: 'checkbox' },
    { key: 'primaryColor', label: 'Primary Color', type: 'color-select', options: [{ value: '#FF5733', label: 'Red' }, { value: '#33FF57', label: 'Green' }] },
];

2. Detailed Settings Explanation

Setting: Theme

Setting: Items Per Page

Setting: Enable Notifications

Setting: Primary Color

Data Expectations

The initialValues prop should be an object where keys correspond to the defined schema keys. The onChange prop is a function that takes two parameters: the key of the setting that was changed and the new value for that setting. The function can return either a promise or nothing.

AI Integrations and Billing Impacts

Currently, there are no specific AI integrations directly associated with SettingsForm. However, the values configured via this form may influence features that require user-defined thresholds, alert settings, or custom report appearances driven by AI models in Vantage. While the form itself does not have any direct billing impacts, the choices made via settings might determine resource usage, which could, in turn, impact billing, especially if they govern data processing limits or notification thresholds in relation to premium features.

Use Cases & Examples

Use Case 1: Theme Customization

A company wants to ensure that their analytics dashboard aligns with their corporate branding. They can use the SettingsForm to allow users to pick a theme and customize colors.

Use Case 2: Pagination Control

In a data-heavy application, users may want control over how many records are displayed per page. The Items Per Page setting can be adjusted based on user preferences, improving the navigation experience.

Example Configuration

To configure the SettingsForm to manage themes and enable notifications, here is a sample implementation:

javascript
const initialValues = {
    theme: 'light',
    itemsPerPage: 10,
    notificationsEnabled: true,
    primaryColor: '#33FF57'
};

const handleChange = async (key, value) => {
    console.log(`Setting changed: ${key} = ${value}`);
    // Save settings to backend or local storage here
};

<SettingsForm schema={schema} initialValues={initialValues} onChange={handleChange} />

This configuration initializes the settings with default values, allowing users to customize their experience directly from the UI, followed by corresponding actions on change events.