# Overview

Choose the right component for each documentation problem.

import { Callout, Card, CardGrid, Steps } from '@prosefly/astro-components';

Use `@prosefly/astro-components` when your docs have outgrown plain Markdown
but you still want authors to write normal MDX. The package focuses on common
documentation jobs rather than application UI: explain risk, compare options,
show structure, and guide readers through a task.

## Choose By Reader Need

<CardGrid>
  <Card icon="lucide:message-square-warning" title="Warn or emphasize" href="/components/callout/">
    Use `Callout` for notes, tips, warnings, and destructive guidance that
    should stand apart from the surrounding prose.
  </Card>
  <Card icon="lucide:panel-top" title="Show equivalent choices" href="/components/tabs/">
    Use `Tabs` for package managers, frameworks, languages, or other parallel
    examples where the reader should pick one.
  </Card>
  <Card icon="lucide:list-collapse" title="Keep secondary detail nearby" href="/components/accordion/">
    Use `Accordions` for optional explanations, FAQs, and background details
    that should not interrupt the main path.
  </Card>
  <Card icon="lucide:folder-tree" title="Explain project structure" href="/components/file-tree/">
    Use `FileTree` when a reader needs to create, find, or understand files and
    directories.
  </Card>
  <Card icon="lucide:route" title="Point readers forward" href="/components/cards/">
    Use `Card` and `CardGrid` for related guides, feature summaries, and
    next-step links.
  </Card>
  <Card icon="lucide:list-checks" title="Walk through a process" href="/components/steps/">
    Use `Steps` for installation, migration, and configuration procedures.
  </Card>
  <Card icon="lucide:terminal-square" title="Generate install tabs" href="/package-manager-tabs/">
    Use package-manager tabs when readers should choose between `pnpm`, `npm`,
    `yarn`, and `bun`.
  </Card>
  <Card icon="lucide:git-branch" title="Explain a system" href="/mermaid/">
    Use Mermaid code blocks for flows, sequences, states, classes, data models,
    and XY charts that should build into static SVG.
  </Card>
  <Card icon="lucide:image" title="Render image galleries" href="/images/">
    Use image transforms when authors should write plain Markdown screenshots
    and get polished figures.
  </Card>
  <Card icon="lucide:video" title="Present video clips" href="/components/video-player/">
    Use VideoPlayer for visibility-aware short clips and native controls for
    longer videos, with optional automatic MDX figure conversion.
  </Card>
  <Card icon="lucide:code-xml" title="Enhance code blocks" href="/expressive-code/">
    Add file icons and language labels to Expressive Code frames with the
    independent plugin.
  </Card>
</CardGrid>

<Callout type="note" title="Keep pages scannable">
  Prefer the smallest component that solves the reader's problem. A page with a
  few well-placed components is usually easier to read than a page where every
  paragraph is boxed or interactive.
</Callout>

## Visual Editing With Prosefly

[Prosefly](https://prosefly.com/) natively supports Prosefly components in its
visual editor. Authors can create and edit content with these components
visually, alongside the Markdown and MDX authoring options described here.

## Build A Page

<Steps>

1. **Start with plain Markdown.**

   Write the explanation first. Add components only where the reader needs a
   stronger structure than headings, paragraphs, and lists.

2. **Import locally.**

   Import components at the top of the MDX file so the page makes its own
   dependencies obvious.

   ```mdx
   import { Callout, Steps } from '@prosefly/astro-components';
   ```

3. **Use transforms for repeated patterns.**

   In standalone Astro projects, enable the package-manager tab or image
   transform that matches the content.
    Dahlia and [Lotus](https://astro-theme-lotus.prosefly.dev/) enable both
    automatically.

4. **Theme once in the shell.**

   Configure `--pf-*` custom properties in the site layout, not in each MDX
   page.

</Steps>

Users of [Dahlia](https://astro-theme-dahlia.prosefly.dev/) or
[Lotus](https://astro-theme-lotus.prosefly.dev/) usually start at step 2 because
their themes already configure the Markdown transforms, Iconify preload
middleware, and shared styles.
