Skip to content

Custom Components

This project includes several custom components to enhance your documentation. This guide explains how to use them.

The ModelViewer component allows you to embed interactive 3D models directly in your documentation. It supports STL, OBJ, and GLTF/GLB formats.

Import the component and use it with the client:load directive (required for interactivity).

import ModelViewer from '../../../components/ModelViewer';
<ModelViewer client:load src="/models/example.stl" alt="Description of the model" />
PropTypeDefaultDescription
srcstringRequiredPath to the 3D model file (relative to public/).
altstringOptionalA label displayed in the top-left corner of the viewer.
heightstring'400px'Height of the viewer container.
typestringAuto-detectedExplicitly set file type (‘stl’, ‘obj’, ‘gltf’, ‘glb’).
Example STL Model

The FileDownload component provides a styled button for users to download files, such as source code, 3D models, or PDFs.

import FileDownload from '../../../components/FileDownload';
<FileDownload
src="/models/example.stl"
title="Download Model"
description="STL format for 3D printing"
/>
PropTypeDefaultDescription
srcstringRequiredPath to the file to download.
titlestringFilenameMain text displayed on the button.
descriptionstringOptionalSmaller text displayed below the title.
Download Example ModelClick to download the STL file.

The ToolsSection and Tool components allow you to display a list of tools used in a project or guide, complete with logos and links.

import { ToolsSection, Tool } from '../../../components/ToolsUsed';
<ToolsSection>
<Tool
name="FreeCAD"
image="https://cdn.simpleicons.org/freecad/CB333B"
href="https://www.freecad.org/"
/>
<Tool
name="Bambu Studio"
image="https://cdn.simpleicons.org/bambulab/00AE42"
href="https://bambulab.com/en/software/bambu-studio"
/>
</ToolsSection>
PropTypeDefaultDescription
namestringRequiredThe name of the tool.
imagestringRequiredURL or path to the tool’s logo image.
hrefstringOptionalURL to the tool’s website.