Skip to main content
Version: 1.0.3

Settings

Overview

Settings Page is a highly customizable, animation-rich component designed for modern applications.

It supports:

  • Theme switching (light / dark / auto)
  • Language selection (UI-agnostic, consumer-controlled)
  • Timezone management with live time preview
  • Notification & privacy toggles
  • Action confirmations (e.g. data export)
  • Smooth, configurable animations

The component is UI-only and framework-agnostic in behavior.
It exposes callback hooks instead of business logic, allowing consumers to integrate APIs, persistence layers, analytics, or i18n solutions of their choice.

Fully responsive and accessibility-friendly by default.


Preview

Basic


Installation

ignix add component settingsPage

Examples

Variants


Integrated with Layout


Dynamic translation loading

SettingsPage does not bundle translations.

To support language switching, provide an onLanguageChange handler via I18nProvider.

const loadLanguage = async (lang: string) => {
const messages = await fetch(`/i18n/${lang}.json`).then(r => r.json());
setMessages(messages);
};

<I18nProvider
value={{
language,
setLanguage,
t,
onLanguageChange: loadLanguage,
}}
>
<SettingsPage />
</I18nProvider>

Usage

import { SettingsPage } from "@src/components/templates/settingspage";
import { I18nProvider } from "@src/components/templates/settingspage/i18n";

type Messages = Record<string, string>;

function App() {
const [language, setLanguage] = useState("en");
const [messages, setMessages] = useState<Messages>({});

const loadLanguage = useCallback(async (lang: string) => {
const data = await fetch(`/i18n/${lang}.json`).then((r) => r.json());
console.log(data);
setMessages(data);
}, []);

const t = useCallback((key: string) => messages[key] ?? key, [messages]);

return (
<I18nProvider
value={{
language,
setLanguage,
t,
onLanguageChange: loadLanguage,
}}
>
<SettingsPage
languages={[
{ code: "en", name: "English", native: "English" },
{ code: "de", name: "German", native: "Deutsch" },
{ code: "ja", name: "Japanese", native: "日本語" },
{ code: "hi", name: "Hindi", native: "Hindi" },
]}
onNotificationsChange={(all) => {
fetch("/api/preferences", {
method: "POST",
body: JSON.stringify(all),
});
}}
onPrivacysChange={(all) => {
fetch("/api/preferences", {
method: "POST",
body: JSON.stringify(all),
});
}}
/>
</I18nProvider>
);
}

export default App;

Props

Core Configuration

PropTypeDefaultDescription
languagesLanguageOption[][{ code: "en", name: "English", native: "English" }]Language options shown in the language selector. Translation logic is owned by the consumer.
theme"auto" | "light" | "dark""light"Visual theme mode. auto follows system preferences.
animationVariant"none" | "fade" | "slide" | "scale" | "spring" | "stagger""slide"Controls page-level and card-level animations.

Animation Controls

PropTypeDefaultDescription
dropDownAnimation"default" | "fade" | "scale" | "slide" | "flip""default"Animation style for dropdown menus.
dialogAnimation"popIn" | "springPop" | "backdropZoom" | "flip3D" | "skewSlide" | "glassBlur" | "skyDrop""popIn"Animation used by confirmation dialogs.
switchAnimation"default" | "bounce" | "scale" | "rotate" | "fade" | "elastic" | "pulse" | "shake" | "flip" | "jelly" | "glow""bounce"Animation style for toggle switches.

Notifications & Privacy

PropTypeDefaultDescription
notificationOptionsNotificationOption[][{ id: "email", label: "Email Notification", defaultChecked: true }]Notification toggle configuration.
privacyOptionsPrivacyOption[][{ id: "everybody", label: "Everybody", defaultChecked: true }]Privacy preference toggles.
onNotificationChange(id, checked, all) => voidFired when a single notification toggle changes.
onNotificationsChange(all) => voidFired when notification state updates.
onPrivacyChange(id, checked, all) => voidFired when a single privacy toggle changes.
onPrivacysChange(all) => voidFired when privacy state updates.

Actions

PropTypeDefaultDescription
onExportData() => void | Promise<void>Called after export confirmation dialog is accepted.

Design Principles

  • UI-only: No API calls, no persistence
  • Open-source friendly: No forced i18n, state, or backend assumptions
  • Composable: Works standalone or inside complex layouts
  • Accessible: Keyboard and screen-reader friendly
  • Animation-first: Motion enhances UX without locking behavior

When to Use

✔ Dashboards
✔ Admin panels
✔ SaaS settings screens
✔ Design systems
✔ White-label products


When Not to Use

✖ If you need opinionated backend logic
✖ If you want bundled translations
✖ If you don’t need animation or configurability