Documentation#
The documentation is written in enhanced Markdown, called MDX. It allows us to import other Markdown files along with React components and JavaScript logic.
Handling themes#
If you need to show some documentation only for when a certain theme is selected, you can do so:
<VisibilityByTheme visible="eiendom">## Eiendom examplesText<SpecialExample /></VisibilityByTheme>
Link to a specific theme#
You can add a parameter called eufemia-theme to a url:
[Relative](/uilib/components/badge/demos/?eufemia-theme=sbanken)Absolute: https://eufemia.dnb.no/uilib/components/badge/demos/?eufemia-theme=sbanken
It will change and set the currently used theme once the user visits the related page.
Printing#
Portal pages use the shared plain print layout, including fullscreen documentation. Navigation and editing tools are hidden, and the page path and version appear after the content.
A page that demonstrates its own print layout can set printLayout: custom
in its frontmatter. It then owns paper colors, layout and footer behavior.
Use this for document previews and dedicated print-style fixtures,
independently of the fullscreen setting.
Language#
Write the documentation in American English, such as color, behavior, canceled, and customize.
Keep the original spelling in:
- Release notes and the changelog.
- URLs, file paths, and public names, such as
/uilib/usage/customisation/. - Names and titles of external sources.
Translations follow their locale. See Locale support.