← Business Systems Specialist Collection adatlapja
Nézd meg, miben segít
2. Realistic Content in Examples (No
Komponensdokumentáció
Életszerű példával, leírt billentyűzetes működéssel és kifejezett korlátokkal magyarázza a komponensválasztást és használatot.
component-documentation-examples
Ezt a skillt használó csapattagok
Mikor hasznos?
Akkor használd, ha fejlesztőknek megfelelő közös komponenst kell kiválasztaniuk és beépíteniük.
Miben segít neked?
- Elmagyarázza a célt, alternatívákat, nyilvános paramétereket, tartalomhelyeket és dizájntokeneket.
- Életszerű példát ad betöltésre, hibára, hosszú szövegre és szűk képernyőre.
- Dokumentálja a billentyűzetes működést, akadálymentességi feltételeket és nem támogatott eseteket.
Például ezt kérheted
Dokumentáld a párbeszédablakot hosszú fordított címmel, ellenőrzési hibával és helyes billentyűzetes bezárással. Adj másolható példát elutasított beküldéssel. Magyarázd el a fókusz helyét, a hiba felolvasását és a hívó által kötelezően átadott tulajdonságokat.
Részletes dokumentáció
Itt a skill eredeti útmutatóját, példáit és ellenőrzési szempontjait olvashatod az eredeti nyelven.
Összecsukás
Component Documentation & Examples
A design system component that only exists as source code forces every developer to read its implementation to guess which props to pass, when to use it versus a sibling component, and what edge cases it supports. Write concise, accurate documentation that helps developers choose and use the component correctly on the first try.
1. Anatomy of Actionable Component Documentation
For every shared component or token group, document:
- Purpose & When to Use (vs. Alternatives):
- State in 1–2 sentences what user problem the component solves and when to use a related component instead (e.g., "Use
Dialogfor focused tasks requiring user confirmation; useDrawerfor inspecting details alongside context; usePopoverfor lightweight non-modal controls").
- State in 1–2 sentences what user problem the component solves and when to use a related component instead (e.g., "Use
- Public API Reference (Props, Slots, Events & Tokens):
- List supported props/inputs, types, default values and whether required.
- Document named slots / compound subcomponents and semantic CSS tokens that apply to the component.
- Explicitly distinguish public contract from internal implementation details.
- Interactive States & Variants Showcase:
- Provide copy-pasteable, realistic code examples covering primary variants, sizes, loading/disabled/error states and composition patterns.
- Accessibility & Keyboard Contract:
- Document the expected keyboard interactions (
Tab,Enter,Space,Escape, Arrow keys) and any required accessibility props (such as providingaria-labelwhen a visible title is omitted).
- Document the expected keyboard interactions (
- Do / Don't Guidelines & Known Limits:
- Show concrete usage boundaries (e.g., "Do: keep button labels to 1–3 action verbs. Don't: place two Primary buttons side-by-side in the same dialog footer").
- State clearly which edge cases are verified and which capabilities are intentionally unsupported.
2. Realistic Content in Examples (No foo / Lorem ipsum)
- Write every documentation example and workbench story using realistic product copy and representative domain data (real project names, realistic statuses, localized strings, empty states and error messages).
- Include stress-test examples alongside happy-path examples:
- Very long labels, overflowing titles and multi-line descriptions.
- Missing optional fields (no avatar image, empty subtitle, zero items).
- Narrow mobile viewport (
320px) and dark/high-contrast themes.
- When the project uses an i18n catalog (
@orqestria/i18n,data-i18n, framework translation helpers), show how translated labels plug into the component API cleanly.
3. Keeping Documentation Synchronized With Code
- Update component documentation, prop tables and usage examples in the same change that modifies a component's API, tokens or behavior.
- When deprecating a prop or component, mark it clearly in both code types (
@deprecated) and documentation with the exact replacement example and removal condition, and coordinate broader developer guides with the technical writer.
Csomagban lévő fájlok 1
SKILL.md
