libs/components/src directory.apps/docs/src/routes/ directory.libs/components/src/index.ts file.apps/docs/src/routes/menu.md file.Look at the example links above for further clarification on setup.
To add examples in the docs, you can use the Showcase component.
First, in your new route folder, create a examples folder.
Then, add a new example, create a new file in the examples folder, and create a Qwik component that does a default export.
import { component$ } from "@qwik.dev/core";
export default component$(() => {
return <div>Hello World</div>;
});
Then, consume this in the mdx file with the file name as the name of the example.
File tree:
apps/docs/src/routes/tree/examples/hero.tsx
How it looks in MDX:
src/routes/base/checkbox/index.mdx
# Checkbox
<Showcase name="hero" />
A component is ready when it has: