Steps Component
The Steps
component provides configurable multi-level numbering for nested ordered lists. It allows you to customize the numbering style for up to three levels of nesting while maintaining clean, semantic HTML structure.
Basic Usage
Simple Numbered List
<Steps>
<ol>
<li>First main step</li>
<li>Second main step</li>
<li>Third main step</li>
</ol>
</Steps>
Result:
- First main step
- Second main step
- Third main step
Two-Level Nested List
<Steps>
<ol>
<li>First main step</li>
<li>
Second main step
<ol>
<li>Substep A</li>
<li>Substep B</li>
</ol>
</li>
<li>Third main step</li>
</ol>
</Steps>
Result:
- First main step
Second main step
- Substep A
- Substep B
- Third main step
Three-Level Deep Nesting
<Steps>
<ol>
<li>
Install required software
<ol>
<li>Download the installer</li>
<li>
Run the installation
<ol>
<li>Accept the license</li>
<li>Choose installation directory</li>
<li>Configure options</li>
</ol>
</li>
<li>Restart your system</li>
</ol>
</li>
<li>
Configure your environment
<ol>
<li>Set environment variables</li>
<li>Update your PATH</li>
</ol>
</li>
<li>Verify installation</li>
</ol>
</Steps>
Result:
Install required software
- Download the installer
Run the installation
- Accept the license
- Choose installation directory
- Configure options
- Restart your system
Configure your environment
- Set environment variables
- Update your PATH
- Verify installation
Custom Numbering Styles
All Roman Numerals
<Steps level1="upper-roman" level2="lower-roman" level3="decimal">
<ol>
<li>
Planning Phase
<ol>
<li>
Requirements gathering
<ol>
<li>Stakeholder interviews</li>
<li>Technical assessment</li>
<li>Risk analysis</li>
</ol>
</li>
<li>Resource allocation</li>
</ol>
</li>
<li>
Implementation Phase
<ol>
<li>Development</li>
<li>Testing</li>
</ol>
</li>
<li>Deployment Phase</li>
</ol>
</Steps>
Result:
Planning Phase
Requirements gathering
- Stakeholder interviews
- Technical assessment
- Risk analysis
- Resource allocation
Implementation Phase
- Development
- Testing
- Deployment Phase
Alphabetical with Decimal Sub-steps
<Steps level1="upper-alpha" level2="decimal" level3="lower-alpha">
<ol>
<li>
Data Collection Methods
<ol>
<li>
Surveys and questionnaires
<ol>
<li>Online surveys</li>
<li>Paper-based surveys</li>
<li>Phone interviews</li>
</ol>
</li>
<li>Focus groups</li>
<li>Observational studies</li>
</ol>
</li>
<li>
Data Analysis Techniques
<ol>
<li>Quantitative analysis</li>
<li>Qualitative analysis</li>
</ol>
</li>
<li>Reporting and Documentation</li>
</ol>
</Steps>
Result:
Data Collection Methods
Surveys and questionnaires
- Online surveys
- Paper-based surveys
- Phone interviews
- Focus groups
- Observational studies
Data Analysis Techniques
- Quantitative analysis
- Qualitative analysis
- Reporting and Documentation
Simple Two-Level with Upper-Alpha Secondary
<Steps level1="decimal" level2="upper-alpha">
<ol>
<li>
Prepare materials
<ol>
<li>Gather tools</li>
<li>Set up workspace</li>
<li>Review instructions</li>
</ol>
</li>
<li>
Execute procedure
<ol>
<li>Follow safety protocols</li>
<li>Complete each step in order</li>
<li>Document results</li>
</ol>
</li>
<li>Clean up and finalize</li>
</ol>
</Steps>
Result:
Prepare materials
- Gather tools
- Set up workspace
- Review instructions
Execute procedure
- Follow safety protocols
- Complete each step in order
- Document results
- Clean up and finalize
Real-World Use Cases
Assessment Procedures
<Steps>
<ol>
<li>
Initial Assessment
<ol>
<li>Review submission requirements</li>
<li>
Verify completeness
<ol>
<li>Check all required fields</li>
<li>Validate file formats</li>
<li>Confirm supporting documentation</li>
</ol>
</li>
</ol>
</li>
<li>
Technical Review
<ol>
<li>Schema validation</li>
<li>Content quality check</li>
<li>Compliance verification</li>
</ol>
</li>
<li>Final Approval Process</li>
</ol>
</Steps>
Result:
Initial Assessment
- Review submission requirements
Verify completeness
- Check all required fields
- Validate file formats
- Confirm supporting documentation
Technical Review
- Schema validation
- Content quality check
- Compliance verification
- Final Approval Process
Manifestation Assessment with Components
<Steps>
<ol>
<li>
Carry out a preliminary assessment of the manifestation
</li>
<li>
How does the manifestation describe itself?
<ol>
{/* <li><Mandatory />Record <InLink href="/docs/statements/1025">has manifestation statement</InLink> elements</li>
<li><Mandatory />Record <InLink href="/docs/statements/1028">has manifestation statement of title and responsibility</InLink> elements</li>
<li>Record <InLink href="/docs/notes/1200">has note on manifestation statement</InLink> elements</li> */}
<li><Mandatory />Record has manifestation statement elements</li>
<li><Mandatory />Record has manifestation statement of title and responsibility elements</li>
<li>Record has note on manifestation statement elements</li>
</ol>
</li>
<li>
What appellations are used to label the manifestation?
<ol>
<li>
{/* <Mandatory />Record <InLink href="/docs/relationships/1274">has appellation of manifestation</InLink> elements */}
<Mandatory />Record has appellation of manifestation elements
<ol>
{/* <li>Record <InLink href="/docs/relationships/1037">has title of manifestation</InLink> elements</li>
<li>Record <InLink href="/docs/relationships/1111">has identifier of manifestation</InLink> elements</li> */}
<li>Record has title of manifestation elements</li>
<li>Record has identifier of manifestation elements</li>
<li>
{/* Record <InLink href="/docs/relationships/1234">has access point of manifestation</InLink> elements */}
Record has access point of manifestation elements
<ol>
{/* <li><Mandatory />Record <InLink href="/docs/relationships/1257">has authorized access point of manifestation</InLink> elements</li> */}
<li><Mandatory />Record has authorized access point of manifestation elements</li>
</ol>
</li>
{/* <li>Record <InLink href="/docs/notes/1273">has note on nomen associated with manifestation</InLink> elements</li> */}
<li>Record has note on nomen associated with manifestation elements</li>
</ol>
</li>
</ol>
</li>
</ol>
</Steps>
Result:
Carry out a preliminary assessment of the manifestation
How does the manifestation describe itself?
What appellations are used to label the manifestation?
✽Record has appellation of manifestation elements
- Record has title of manifestation elements
- Record has identifier of manifestation elements
Record has access point of manifestation elements
- ✽Record has authorized access point of manifestation elements
- Record has note on nomen associated with manifestation elements
Installation Guide
<Steps level1="decimal" level2="lower-alpha" level3="lower-roman">
<ol>
<li>
System Requirements
<ol>
<li>
Hardware requirements
<ol>
<li>Minimum RAM: 8GB</li>
<li>Storage: 20GB available</li>
<li>Processor: 2GHz dual-core</li>
</ol>
</li>
<li>Software dependencies</li>
</ol>
</li>
<li>
Installation Steps
<ol>
<li>Download installer</li>
<li>Run installation wizard</li>
<li>Configure settings</li>
</ol>
</li>
</ol>
</Steps>
Result:
System Requirements
Hardware requirements
- Minimum RAM: 8GB
- Storage: 20GB available
- Processor: 2GHz dual-core
- Software dependencies
Installation Steps
- Download installer
- Run installation wizard
- Configure settings
Research Methodology
<Steps level1="upper-roman" level2="upper-alpha" level3="decimal">
<ol>
<li>
Literature Review
<ol>
<li>
Database Searches
<ol>
<li>Academic databases</li>
<li>Professional repositories</li>
<li>Grey literature sources</li>
</ol>
</li>
<li>Citation Management</li>
</ol>
</li>
<li>
Data Collection
<ol>
<li>Participant Recruitment</li>
<li>Data Gathering Protocols</li>
</ol>
</li>
</ol>
</Steps>
Result:
Literature Review
Database Searches
- Academic databases
- Professional repositories
- Grey literature sources
- Citation Management
Data Collection
- Participant Recruitment
- Data Gathering Protocols
Component Props
Prop | Type | Default | Description |
---|---|---|---|
level1 | string | 'decimal' | Numbering style for first level lists |
level2 | string | 'lower-alpha' | Numbering style for second level lists |
level3 | string | 'lower-roman' | Numbering style for third level lists |
children | ReactNode | - | The ordered list content to be styled |
Available Numbering Styles
decimal
- 1, 2, 3, 4...lower-alpha
- a, b, c, d...upper-alpha
- A, B, C, D...lower-roman
- i, ii, iii, iv...upper-roman
- I, II, III, IV...
Accessibility Features
The Steps component maintains semantic HTML structure:
- Uses proper
<ol>
and<li>
elements for screen readers - Preserves hierarchical relationships between list levels
- Maintains keyboard navigation through list items
- Custom numbering is visual-only and doesn't affect screen reader interpretation
- Works with all assistive technologies that support standard HTML lists
Implementation Notes
Technical Architecture
The component uses CSS custom properties to apply numbering styles:
- Wraps content in a container with
data-*
attributes - CSS maps attributes to custom properties
- Nested selectors apply appropriate styles to each level
- No JavaScript required - pure CSS solution
Global Availability
The Steps component is globally available in all MDX files through /portal/src/theme/MDXComponents.tsx
. No imports are needed.
TypeScript Support
interface StepsProps extends PropsWithChildren {
level1?: string;
level2?: string;
level3?: string;
}
CSS Modules
Uses styles.module.scss
with scoped classes:
.steps
- Main container- CSS custom properties:
--steps-level1
,--steps-level2
,--steps-level3
- Data attributes mapped to CSS variables
Bundle Size
- Component: ~1KB minified
- Styles: ~2KB minified
- Total: Less than 3KB
Browser Support
- All modern browsers (Chrome, Firefox, Safari, Edge)
- Full support for CSS custom properties
- Graceful degradation to default numbering in older browsers
- Mobile browsers fully supported
Testing
Component includes 5 comprehensive unit tests:
- Renders children correctly
- Applies default data attributes
- Applies custom numbering styles via props
- Maintains semantic HTML structure
- Applies CSS module classes
Performance Considerations
- Pure CSS solution - no JavaScript overhead
- No re-renders on prop changes
- Minimal DOM manipulation
- Efficient CSS selector usage
Best Practices
- Consistent Nesting: Keep your nesting levels consistent within a document
- Logical Hierarchy: Use numbering styles that make sense for your content type
- Three Levels Max: Avoid going deeper than three levels for readability
- Semantic HTML: Always use proper
<ol>
and<li>
elements inside Steps - Content Length: Keep individual steps concise and actionable
- Line Breaks: When nesting content in
<li>
tags, use line breaks after the opening tag in MDX
Common Patterns
Process Documentation
<Steps level1="decimal" level2="lower-alpha" level3="lower-roman">
Legal/Formal Documents
<Steps level1="upper-roman" level2="upper-alpha" level3="decimal">
Quick Reference/Checklists
<Steps level1="decimal" level2="upper-alpha">
Academic/Research
<Steps level1="upper-alpha" level2="decimal" level3="lower-alpha">
Troubleshooting
MDX Parsing Issues
If you encounter MDX parsing errors with nested lists:
- Line Breaks: Ensure
<li>
tags with nested content have line breaks after the opening tag - Proper Nesting: Always close nested
<ol>
tags inside their parent<li>
- Consistent Indentation: Use consistent indentation for readability
Correct Format:
<li>
Parent item text
<ol>
<li>Child item</li>
</ol>
</li>
Incorrect Format:
<li>Parent item text
<ol>
<li>Child item</li>
</ol>
</li>
Related Components
- Examples & Example - For organizing example blocks and property-value tables
- ExampleTable - For bibliographic data with expandable details
- VocabularyTable - For vocabulary definitions
- Element Reference - For documenting vocabulary elements