Reference
Component Library
Opinionated MDX components for banners, cards, accordions, file trees, tabs, diagrams, and polished code blocks.
Why it exists#
Shared chrome
Use the same building blocks in the example app and production docs without splitting another package.
Better defaults
Stop re-inventing card grids, migration banners, and code block wrappers in every repo.
MDX-native
All components register through `getDefaultMdxComponents()` so they work in plain content files.
Banner and cards#
Docs homes
Point new readers at the right namespace, showcase major capabilities, and anchor the docs visual identity.
Guide sections
Break long pages into scannable clusters without falling back to plain unordered lists.
Accordions#
What belongs in an accordion?
Put FAQs, optional setup branches, migration caveats, or product-specific notes here. Keep the title short and action-oriented.
Does it still work with normal markdown?
Yes. You can mix fenced code blocks, headings, lists, tables, and JSX components in the same .mdx file.
Why not depend on another UI package?
EmcyDocs keeps everything in one library on purpose. The components are small, docs-focused, and styled by the same shared stylesheet.
File trees#
▾reference
▾layouts
Tabs and steps#
Import the package once
Add @emcy/docs/styles.css globally and keep your docs content inside the repo.
Use the shared layouts
Start with DocsLayout, then add your own theme, search, locale switching, or chrome overrides as needed.
Reach for components in MDX
Use banners, cards, accordions, files, tabs, and steps where a plain markdown block would feel flat.
Diagrams#
Code blocks#
The goal is straightforward: one package, one visual language, and enough primitives to make docs pages look intentional without creating another package boundary. When you need live theme switching, keep the same DocsLayout and add DocsThemeProvider around it instead of swapping to a different component.