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.
Quick Start
Section titled “Quick Start”Markdown Syntax (Recommended)
Section titled “Markdown Syntax (Recommended)”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>
Array Syntax (Traditional)
Section titled “Array Syntax (Traditional)”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" ]}/>
Interactive Mode
Section titled “Interactive Mode”Enable interactive mode to allow students to check off completed objectives and track their progress:
JavaScript Fundamentals
<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>
Visual Variants
Section titled “Visual Variants”The component supports three different visual styles to match your content design:
Default Variant (Recommended)
Section titled “Default Variant (Recommended)”Course Overview
- ➤ Complete the foundational modules
- ➤ Practice with hands-on exercises
- ➤ Build a capstone project
Outline Variant
Section titled “Outline Variant”Advanced Topics
- ➤ Implement advanced patterns
- ➤ Optimize for performance
- ➤ Deploy to
production
environments
Minimal Variant
Section titled “Minimal Variant”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>
Component API
Section titled “Component API”Prop | Type | Default | Description |
---|---|---|---|
title | string | "Learning Objectives" | The title displayed at the top of the component |
objectives | string[] | [] | Array of objective strings (optional when using markdown) |
interactive | boolean | false | Enable checkboxes for progress tracking |
variant | "default" | "outline" | "minimal" | "default" | Visual style variant |
showProgress | boolean | false | Show progress bar (requires interactive={true} ) |
id | string | auto-generated | Custom ID for localStorage and accessibility |
Input Methods
Section titled “Input Methods”The component supports two flexible ways to provide objectives:
1. Markdown Syntax (Recommended)
Section titled “1. Markdown Syntax (Recommended)”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
2. Array Syntax (Traditional)
Section titled “2. Array Syntax (Traditional)”Pass objectives as an array prop (useful for dynamic content):
<LearningObjectives title="My Lesson" objectives={["First objective", "Second objective", "Third objective"]}/>
Real-World Examples
Section titled “Real-World Examples”Course Introduction
Section titled “Course Introduction”Course Introduction - What You'll Master
Technical Deep Dive
Section titled “Technical Deep Dive”Database Design Principles
Quick Reference Card
Section titled “Quick Reference Card”React Hooks - Key Takeaways
- ➤ Use
useState
for component state management - ➤ Apply
useEffect
for side effects and cleanup - ➤ Optimize with
useMemo
anduseCallback
when needed - ➤ Create custom hooks for reusable logic
Multiple Learning Modules
Section titled “Multiple Learning Modules”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>