Installation
Install the package for Lotus or a standalone Astro site.
Install the package where your MDX content is rendered. Lotus users can usually start importing components immediately. Standalone Astro users can also enable the icon integration, package-manager tabs, and image galleries.
Install
pnpm add @prosefly/astro-componentsnpm install @prosefly/astro-componentsyarn add @prosefly/astro-componentsbun add @prosefly/astro-componentsUse In MDX
Standalone Astro projects need MDX configured before they can render component
imports inside .mdx files. If the project already renders MDX pages, or if it
uses Lotus, skip this setup.
import mdx from '@astrojs/mdx';import { defineConfig } from 'astro/config';
export default defineConfig({ integrations: [mdx()],});import { Callout, Steps } from '@prosefly/astro-components';
<Callout type="tip" title="Keep examples close to the task"> Import only the components used by the current page.</Callout>
<Steps>
1. Install the package.2. Import the component.3. Write normal Markdown inside the component.
</Steps>Configure Optional Features
-
Add icon preloading if you use icons outside Lotus.
astro.config.ts import { defineConfig } from 'astro/config';import proseflyIcon from '@prosefly/astro-components/icon';export default defineConfig({integrations: [proseflyIcon({preload: ['lucide:sparkles', 'simple-icons:github'],}),],}); -
Add markdown transforms if you want automatic tabs or galleries.
astro.config.ts import { defineConfig } from 'astro/config';import {rehypeImageGallery,remarkPackageManagerTabs,} from '@prosefly/astro-components/markdown';export default defineConfig({markdown: {remarkPlugins: [remarkPackageManagerTabs],rehypePlugins: [rehypeImageGallery],},}); -
Set theme tokens in the layout.
Components have fallbacks, but a site-level token set keeps them visually aligned with the surrounding docs.
For detailed setup, see Package Manager Tabs and Images.
Import Paths
Use the main entry for components:
import { Callout, Card, Tabs } from '@prosefly/astro-components';Use subpath entries for integrations:
import proseflyIcon from '@prosefly/astro-components/icon';import { rehypeImageGallery } from '@prosefly/astro-components/markdown';Component Exports
AccordionItemandAccordionsBadgeCalloutCardandCardGridFileTreeIconStepsTabItemandTabs
Last updated Jul 18, 2026