A React library for a settings UI similar to that of Chrome.
⚠️ We ship this as part of our product, but search has not made it to production yet. In addition, we may make visual changes over time. For now, the only documentation is the code and the storybook stories.
You can play around with the disorganized stories.
yarn install
yarn dev
npm install @sillsdev/config-r
Use src/stories/bloom.stories.tsx as the canonical reference for alpha18 API usage. The current codebase enforces several structural rules and new props; the fastest path is to align your code with those patterns.
ConfigrPanechildren must beConfigrPageorConfigrAreaelements only. Wrap groups of pages inConfigrAreato get the left-nav section headings.ConfigrPagenow requirespageKeyand throws if it is missing. Keep these keys stable and unique within a pane.ConfigrPagechildren are restricted toConfigrGroup,ConfigrForEach, orConfigrStatic. Move any custom layout intoConfigrGroupor wrap text/UI-only blocks inConfigrStatic.ConfigrForEachnow uses a render signature of(pathPrefix, index) => ReactNode; build full Formik paths from the prefix (see the languages loop in the story).ConfigrSelectoptions accept numbers or{ label, value, description }objects; descriptions become tooltips.- Override/locking behavior is standardized: most controls accept
overrideValue+overrideDescription;ConfigrBooleanaddslockedandimmediateEffect. - Leaf controls support
requiredandvalidation.validationreceives the current field value and may returntrue,false, or a string.falserenders a genericInvalid valuemessage, while a string is shown inline in red. - Required fields show a
*beside the control. The fallbackRequiredmessage for empty required fields is controlled at the pane level withshowRequiredMessageand defaults totrue. ConfigrInputcovers standard text, number, and email fields. It also supportscharactersWide,allowNewLines,minLinesToShow, andmaxLinesToShowBeforeScrollingfor compact multiline text entry.ConfigrPaneadds UI props likeshowAppBar,showSearch,showJson,themeOverrides,initiallySelectedTopLevelPageKey, andlocalizations.
To provide languages other than English for the small set of built-in strings, pass localizations to ConfigrPane:
<ConfigrPane
label="Configuracion"
initialValues={initialValues}
showSearch={true}
localizations={{
fieldRequiredMessage: 'Requiere un valor',
invalidValueMessage: 'Valor no valido',
searchLabel: 'Buscar',
matchesLabel: (count) => `${count} coincidencias`,
}}
>
{/* pages */}
</ConfigrPane>searchLabel is used for both the visible search placeholder and the input accessibility label.


