Documentation to support the Nucleus Design System.
It is built using Astro with the Starlight theme and Lit.
npm installnpm run startThis command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
To build the Docs, run the build script in the package.json file:
npm run buildThe output will be in the ./build directory.
src/assets: Contains the assets used in the project, including HTML snippets used in the Examples and Configurator.src/components: Contains Astro and Lit components.src/content/docs: Contains themdxdocumentation files, including components, guidelines, page-types and patterns.
astro.config.mjs: The Astro configuration file.src/content/docs/index.mdx: The Homepage of https://nucleus.design/
You can add a styled aside to a page with the following syntax:
:::tip[Did you know?]
Astro helps you build faster websites with “Islands Architecture”.
:::The above code will render the following:
The available aside types are currently as follows:
- Note
- Tip
- Caution
- Danger
- Do
- Don't
- Updated
Badges are managed by a JSON file (src > data > badges.json) for simple badge management.
Badges can be added to components, assets or tokens.
{
"components": [
{
"name": "ns-control",
"badge": "new"
},
],
"guidelines": [
{
"name": "assets",
"badge": "updated"
},
{
"name": "tokens",
"badge": "floogle"
}
]
}