Page Patterns
SettingsDirectory
Every configuration screen the viewer may open.
import { SettingsDirectory } from 'faifo-design'SettingsDirectory lists configuration screens grouped by module, with a search that narrows the
links already on the page.
#When to use
- The host supplies only permitted modules and links; a module or section left without links is not drawn, so a role never sees an empty heading.
#Examples
Each example is a specimen of the package catalogue, rendered on the server exactly as shown in its code.
#SettingsDirectory
Every configuration screen the viewer may open, grouped by module: its mark, its name and links. The search narrows links, modules and sections already on the page.
Sales and care
Organisation and access
No setting matches
Try another word or clear the search.
Show codeHide code
import { Icon, SettingsDirectory } from 'faifo-design'
export const Example = () => (
<SettingsDirectory
id="specimen-settings"
label="Settings"
search={{
label: 'Search settings',
emptyTitle: 'No setting matches',
emptyMessage: 'Try another word or clear the search.',
}}
sections={[
{
id: 'business',
title: 'Sales and care',
modules: [
{
id: 'crm',
label: 'CRM',
icon: <Icon name="users" />,
links: [
{ id: 'teams', label: 'Teams and assignment', href: '#teams', current: true },
{ id: 'process', label: 'Sales process', href: '#process' },
{ id: 'tags', label: 'Profile tags', href: '#tags' },
],
},
{
id: 'care',
label: 'Customer care',
icon: <Icon name="message-circle" />,
links: [
{ id: 'programs', label: 'Programs', href: '#programs' },
{ id: 'requests', label: 'Requests and complaints', href: '#requests' },
],
},
{ id: 'hidden', label: 'Not permitted', icon: <Icon name="lock" />, links: [] },
],
},
{
id: 'system',
title: 'Organisation and access',
modules: [
{
id: 'users',
label: 'Users',
icon: <Icon name="shield-check" />,
links: [
{ id: 'users', label: 'Users', href: '#users' },
{ id: 'roles', label: 'Roles', href: '#roles' },
],
},
],
},
]}
/>
)#Contract
#Settings directory
The rail's gear opens one settings page that gathers every module's configuration. Pass
AppSwitcher.settings as { id, label, href, current? } to make the gear a link to that page
(current lights it on the page and on the configuration screens it leads to); the older
{ id, label, items } keeps the click-only menu for hosts that have no page yet.
The page is a WorkspacePage whose body is SettingsDirectory: sections, each a card holding
modules; a module shows its own menu mark (the host passes the icon markup its menu uses), its
name, an optional one-line description and links to its configuration screens. The host passes
only modules and links the viewer may open; a module without links and a section without
modules are not drawn. Up to three modules share a row, fewer as the card narrows. Link rows use
--faifo-control-height-large, so they become touch targets on a phone without a local media rule.
search adds a search field. The shared runtime filters on input, accent- and case-insensitively
(đ matches d): a link that matches stays, a module whose name matches keeps all its links,
sections with nothing left hide, and the empty state appears only for a search that matches
nothing. Escape clears the field. Nothing is fetched: search narrows what the server already
permitted. Specimen settings-directory; tests design-system-settings-directory.test.tsx.
Configuration screens do not stay in a module's sidebar menu once they are reachable here.
KetSuite serves this page at /admin/settings and builds it from the permitted menu: each module
hangs a heading under the admin root (admin.crm, admin.customerCare, admin.access,
admin.config) with its own icon, and one entry per configuration screen beneath it. A screen
with tabs or groups lists each one by query (?tab=process); its first entry keeps the bare
path so the menu's prefix match still lights the gear there. admin.access and admin.config
form the organisation section, every other heading the business section. The runtime that
filters the page ships inside the committed client bundles, so rebuild them (npm run build in
apps/ketsuite) whenever this runtime changes.
Faifo Blue (#1746ff) remains the brand reference colour. The accent role, --faifo-accent, is
the quieter #365fd6 in both themes, and primary actions use it through
--faifo-action-primary-bg, with #3151c6 on hover and #2b46b7 when pressed. White labels
retain at least 5.58:1 contrast across these states. Light-mode focus borders
(--faifo-focus-border) follow the accent too; dark mode keeps #668cff for 3:1 against panels.
Accent-coloured text (links, a module's mark) uses --faifo-accent-text, not --faifo-accent:
#1238db in light mode and the lighter #9eb5ff in dark mode (about 8:1 on a panel).
Link uses this role too. Selection, focus, topbar and the first chart series share the
blue family; success, warning and danger keep their semantic colours. Supporting reference
swatches --faifo-ref-azure, --faifo-ref-cyan and --faifo-ref-deep belong to identity and
illustration, not white-labelled small controls. Components use semantic/component roles.
#API
Generated from the package source. A property without a description has none in the source yet.
#SettingsDirectoryComponent
Every configuration screen the viewer may open, grouped by module. The host supplies only permitted modules and links; a module or section left without links is not drawn, so a role never sees an empty heading.
| Property | Description | Type | Default |
|---|---|---|---|
idrequired | – | string | – |
labelrequired | – | string | – |
search | Narrows the links already permitted on the page; nothing is fetched. | { label: string placeholder?: string emptyTitle: string emptyMessage: string } | – |
sectionsrequired | – | readonly SettingsDirectorySection[] | – |
#Types
#SettingsDirectoryLink
| Property | Description | Type | Default |
|---|---|---|---|
idrequired | – | string | – |
labelrequired | – | string | – |
hrefrequired | – | string | – |
current | Marks the setting this page was opened for. | boolean | – |
#SettingsDirectoryModule
| Property | Description | Type | Default |
|---|---|---|---|
idrequired | – | string | – |
labelrequired | – | string | – |
iconrequired | The module's own mark, the icon its menu uses, supplied by the host. | JSXChild | – |
description | – | string | – |
linksrequired | – | readonly SettingsDirectoryLink[] | – |
#SettingsDirectoryProps
The properties of SettingsDirectory, listed above.
#SettingsDirectorySection
| Property | Description | Type | Default |
|---|---|---|---|
idrequired | – | string | – |
titlerequired | – | string | – |
modulesrequired | – | readonly SettingsDirectoryModule[] | – |
#Hooks
The data-ui values these components render. Select them in tests and behaviour; their look belongs to the design system. See Contract.
settings-directorysettings-directory-searchsettings-directory-search-inputsettings-directory-sectionsettings-directory-section-titlesettings-directory-gridsettings-directory-modulesettings-directory-module-headersettings-directory-module-marksettings-directory-module-titlesettings-directory-module-descriptionsettings-directory-linkssettings-directory-linksettings-directory-empty