
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
@abpjs/setting-management
Advanced tools
ABP Framework setting-management components for React - translated from @abp/ng.setting-management
Setting management UI components for ABP Framework in React
@abpjs/setting-management provides a settings management page layout and tab management for ABP-based React applications. It allows organizing application settings into categorized tabs with a unified UI.
This package is a React translation of the original @abp/ng.setting-management Angular package.
# Using npm
npm install @abpjs/setting-management
# Using yarn
yarn add @abpjs/setting-management
# Using pnpm
pnpm add @abpjs/setting-management
This package requires the following peer dependencies:
npm install @abpjs/core @abpjs/theme-shared react-router-dom
import { useEffect } from 'react';
import { Outlet } from 'react-router-dom';
import { SettingLayout, useSettingManagement } from '@abpjs/setting-management';
function SettingsPage() {
const { addSettings } = useSettingManagement();
useEffect(() => {
addSettings([
{ name: 'Account', order: 1, url: '/settings/account' },
{ name: 'Identity', order: 2, url: '/settings/identity' },
{ name: 'Tenant', order: 3, url: '/settings/tenant', requiredPolicy: 'AbpTenantManagement.Tenants' },
]);
}, [addSettings]);
return (
<SettingLayout>
<Outlet />
</SettingLayout>
);
}
import { useSettingManagement } from '@abpjs/setting-management';
function SettingsMenu() {
const {
settings,
selected,
setSelected,
addSetting,
removeSetting,
} = useSettingManagement();
return (
<nav>
{settings.map(tab => (
<button
key={tab.name}
onClick={() => setSelected(tab)}
className={selected?.name === tab.name ? 'active' : ''}
>
{tab.name}
</button>
))}
</nav>
);
}
// In your account module
import { useEffect } from 'react';
import { useSettingManagement } from '@abpjs/setting-management';
function AccountModule() {
const { addSetting } = useSettingManagement();
useEffect(() => {
addSetting({
name: 'Account',
order: 1,
url: '/settings/account',
});
}, [addSetting]);
return null;
}
Layout component for the settings management page with sidebar navigation.
import { SettingLayout } from '@abpjs/setting-management';
<SettingLayout
className="my-settings"
onTabSelect={(tab) => console.log('Selected:', tab.name)}
>
{/* Content renders here */}
</SettingLayout>
Props:
| Prop | Type | Required | Description |
|---|---|---|---|
children | ReactNode | No | Content to render in the main area |
className | string | No | Additional CSS class for the container |
onTabSelect | (tab: SettingTab) => void | No | Callback when a tab is selected |
Hook for managing setting tabs and selection state.
import { useSettingManagement } from '@abpjs/setting-management';
const {
settings, // All registered tabs (sorted by order)
selected, // Currently selected tab
addSetting, // Add a single setting tab
addSettings, // Add multiple setting tabs
removeSetting, // Remove a setting tab by name
setSelected, // Set the selected tab
selectByName, // Select a tab by name
selectByUrl, // Select a tab by URL
clearSettings, // Clear all registered settings
} = useSettingManagement();
Service class for managing setting tabs (singleton pattern).
import { getSettingManagementService } from '@abpjs/setting-management';
const service = getSettingManagementService();
// Add a setting tab
service.addSetting({
name: 'My Settings',
order: 10,
url: '/settings/my',
});
// Get all settings
const allSettings = service.settings;
// Subscribe to changes
const unsubscribe = service.subscribe(() => {
console.log('Settings changed!');
});
The SettingTab interface is re-exported from @abpjs/theme-shared:
import type { SettingTab } from '@abpjs/setting-management';
interface SettingTab {
name: string; // Display name of the tab
order: number; // Sort order (lower = higher priority)
requiredPolicy?: string; // Required permission policy
url?: string; // URL/route for this tab
}
Default route configuration for the setting management module:
import { SETTING_MANAGEMENT_ROUTES } from '@abpjs/setting-management';
// Use in your router configuration
const routes = [
...SETTING_MANAGEMENT_ROUTES.routes,
// your other routes
];
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
import { SettingLayout } from '@abpjs/setting-management';
import AccountSettings from './AccountSettings';
import IdentitySettings from './IdentitySettings';
function App() {
return (
<BrowserRouter>
<Routes>
<Route path="/settings" element={<SettingsPage />}>
<Route index element={<Navigate to="account" replace />} />
<Route path="account" element={<AccountSettings />} />
<Route path="identity" element={<IdentitySettings />} />
</Route>
</Routes>
</BrowserRouter>
);
}
function SettingsPage() {
const { addSettings } = useSettingManagement();
useEffect(() => {
addSettings([
{ name: 'Account', order: 1, url: '/settings/account' },
{ name: 'Identity', order: 2, url: '/settings/identity' },
]);
}, [addSettings]);
return (
<SettingLayout>
<Outlet />
</SettingLayout>
);
}
This package is part of the ABP React monorepo. Contributions are welcome!
LGPL-3.0 - See LICENSE for details.
FAQs
ABP Framework setting-management components for React - translated from @abp/ng.setting-management
The npm package @abpjs/setting-management receives a total of 14 weekly downloads. As such, @abpjs/setting-management popularity was classified as not popular.
We found that @abpjs/setting-management demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.