Advanced Features

25 min

Learning Goals

  • Discover all available components
  • Learn advanced patterns
  • Create professional course content

Advanced Features

In this lesson we show all available features and how to combine them.

Dark Mode Support

All components automatically support dark mode. Users can switch between light and dark mode via the icon in the navigation.

CSS Variables

Colors are defined via CSS variables. You can find them in packages/styles/src/tokens.css.

Responsive Design

The entire layout is developed mobile-first:

Nested Components

Components can be nested arbitrarily:

Important Note

Difficulty Levels for Exercises

Easy Exercise

Easy

Goal: Create a simple callout component.

Add the following code to an MDX file:

<Callout type="success">
  My first callout!
</Callout>

Medium Exercise

Medium

Goal: Combine tabs with code examples.

Create tabs that show the same code in different programming languages:

  • JavaScript
  • TypeScript
  • Python

Use the Tabs and TabPanel components.

Hard Exercise

Hard

Goal: Create a complete course.

  1. Create a new course definition in content/courses/
  2. Add at least 3 lessons
  3. Use all component types:
    • Callouts (all 4 types)
    • Tabs with code examples
    • Quiz with 5+ questions
    • Exercises in all difficulty levels
    • Hints for tips
  4. Test the progress tracking

Cloud Sync Feature

Sync Progress

Learning progress can be synchronized across different devices. Click the cloud icon in the navigation to open the sync dialog.

How it works:

  1. Export your progress as a code
  2. Import the code on another device
  3. Your progress is restored

The integrated search is based on Pagefind and indexes all content automatically:

  • Searches documentation and courses
  • Finds headings, text, and code
  • Keyboard shortcut: Ctrl/Cmd + K
  • Works completely client-side

Accessibility

All components are accessible:

FeatureSupport
Keyboard NavigationFull
Screen ReaderARIA labels
Focus ManagementVisible focus rings
ContrastWCAG AA compliant
Reduced Motionprefers-reduced-motion

Final Quiz

Test: Advanced Features

1. How are colors defined in dark mode?

2. Which search technology is used?

3. What difficulty levels are available for exercises?

4. How is progress saved?

5. Can components be nested?

Summary

You’ve now learned all the advanced features:

  • Dark mode and theming
  • Responsive design for all devices
  • Nested components
  • Different difficulty levels
  • Cloud sync for progress
  • Full-text search with Pagefind
  • Accessibility
Congratulations!

You’re now ready to create your own professional courses and documentation!

Further resources:

  • Check out the component source code
  • Read the Astro documentation
  • Experiment with your own content