Skip to content

Learning Objectives

The Learning Objectives component helps educators clearly communicate what students will achieve in a lesson. It features a clean, professional design with optional interactive progress tracking and supports both traditional array syntax and modern markdown syntax.

The easiest way to use the component is with markdown syntax:

Getting Started

  • Install the Astro Nebula UI package
  • Import the LearningObjectives component
  • Write your objectives using markdown lists
  • Add interactive mode for student progress tracking
---
import { LearningObjectives } from 'astro-nebula-ui';
---
<LearningObjectives title="Getting Started">
- Install the **Astro Nebula UI** package
- Import the `LearningObjectives` component
- Write your objectives using *markdown* lists
- Add `interactive` mode for student progress tracking
</LearningObjectives>

You can also pass objectives as an array prop:

Web Development Basics

  • Understand HTML structure and semantics
  • Style websites with CSS
  • Add interactivity with JavaScript
  • Deploy your first website
<LearningObjectives
title="Web Development Basics"
objectives={[
"Understand HTML structure and semantics",
"Style websites with CSS",
"Add interactivity with JavaScript",
"Deploy your first website"
]}
/>

Enable interactive mode to allow students to check off completed objectives and track their progress:

JavaScript Fundamentals

0 of 5
<LearningObjectives title="JavaScript Fundamentals" interactive showProgress>
- Learn about **variables** and data types
- Understand *function* declarations and expressions
- Master `array` and `object` manipulation
- Handle DOM events and user interactions
- Debug code using browser developer tools
</LearningObjectives>

The component supports three different visual styles to match your content design:

Course Overview

  • Complete the foundational modules
  • Practice with hands-on exercises
  • Build a capstone project

Advanced Topics

  • Implement advanced patterns
  • Optimize for performance
  • Deploy to production environments

Quick Reference

  • Review key concepts
  • Practice core skills
  • Apply knowledge
<!-- Default variant - Full styling with background -->
<LearningObjectives title="Course Overview">
- Complete the foundational modules
- Practice with hands-on exercises
- Build a capstone project
</LearningObjectives>
<!-- Outline variant - Accent border, transparent background -->
<LearningObjectives title="Advanced Topics" variant="outline">
- Implement **advanced patterns**
- Optimize for *performance*
- Deploy to `production` environments
</LearningObjectives>
<!-- Minimal variant - Clean, minimal styling -->
<LearningObjectives title="Quick Reference" variant="minimal">
- Review key concepts
- Practice core skills
- Apply knowledge
</LearningObjectives>
PropTypeDefaultDescription
titlestring"Learning Objectives"The title displayed at the top of the component
objectivesstring[][]Array of objective strings (optional when using markdown)
interactivebooleanfalseEnable checkboxes for progress tracking
variant"default" | "outline" | "minimal""default"Visual style variant
showProgressbooleanfalseShow progress bar (requires interactive={true})
idstringauto-generatedCustom ID for localStorage and accessibility

The component supports two flexible ways to provide objectives:

Write objectives as a markdown list inside the component body:

<LearningObjectives title="My Lesson">
- First objective with **bold** text
- Second objective with *emphasis*
- Third objective with `code` snippets
</LearningObjectives>

Supported Formatting:

  • **text**Bold text
  • *text*Italic text
  • `text`Code text

Pass objectives as an array prop (useful for dynamic content):

<LearningObjectives
title="My Lesson"
objectives={["First objective", "Second objective", "Third objective"]}
/>

Course Introduction - What You'll Master

0 of 5

Database Design Principles

0 of 5

React Hooks - Key Takeaways

  • Use useState for component state management
  • Apply useEffect for side effects and cleanup
  • Optimize with useMemo and useCallback when needed
  • Create custom hooks for reusable logic

The component supports multiple instances on the same page with independent progress tracking:

Module 1: HTML Foundations

Module 2: CSS Styling

<!-- Each module has independent progress tracking -->
<LearningObjectives title="Module 1: HTML Foundations" interactive id="module-1">
- Learn **semantic** HTML structure
- Master form elements and validation
- Understand `accessibility` best practices
</LearningObjectives>
<LearningObjectives title="Module 2: CSS Styling" interactive id="module-2">
- Style layouts with **Flexbox** and **Grid**
- Create *responsive* designs with media queries
- Implement `CSS animations` and transitions
</LearningObjectives>