Course Grid

Grid of course cards

Marketing BlockEducation

Overview

A simple grid layout for displaying multiple courses. Passes borderRadius, borderColor, and shadow through to each CourseCard. Supports 2, 3, or 4 column layouts.

Usage

import { CourseGrid } from '@leanicon/web-builder-library'

Default

Three-column grid with course cards.

Two columns

Four columns

With heading and subtitle

Heading only (no subtitle)

Custom border radius

Custom border color

Sharp corners, no shadow

Dark mode

Two columns — dark mode

Four columns — dark mode

Props

Prop

Type

Default

Description

courses

Course[]

—

Array of courses to display (required)

heading

string?

—

Optional heading above the grid

subtitle

string?

—

Optional subtitle below the heading

columns

2 | 3 | 4

3

Number of grid columns

borderRadius

string?

—

Tailwind border-radius class passed to each card

borderColor

string?

—

Tailwind border-color class passed to each card

shadow

string?

—

Tailwind shadow class passed to each card

colorScheme

"light" | "dark"

—

Force light or dark mode

className

string

—

Additional CSS classes on root

Notes

  • Course type is from course-card — see CourseCard docs for the full type definition.
  • borderRadius, borderColor, and shadow are forwarded to every CourseCard in the grid.
  • Dark mode: pass colorScheme="dark" or place inside a .dark ancestor.

Props

NameTypeDefaultRequiredDescription
headingstring—No
subtitlestring—No
coursesCourse[]—Yes
columnsenum3No
borderRadiusstring—No
borderColorstring—No
shadowstring—No
colorSchemeenum—No
classNamestring—No