MCPcopy Index your code
hub / github.com/chanzuckerberg/edu-design-system

github.com/chanzuckerberg/edu-design-system @v18.5.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v18.5.0 ↗ · + Follow
183 symbols 613 edges 230 files 24 documented · 13%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Education Design System

Test CI Release codecov Release GitHub commits since latest release (branch)

The Education Design System (EDS) is a repository of building blocks, implementing the Chan Zuckerberg Initiative Education Design System. It contains: - Design Tokens defining the color, sizes, and other details used in the system - Tooling/Configuration for using and updating the tokens in a consuming application - Presentational components implementing the common controls provided by the EDS toolkit - Guidelines for creating recipes using EDS, composing the above components

Prerequisites

Currently, EDS supports the following:

  • React 17 or above (tested with React 18.x)
  • Tailwind 3.x

Installation

First, install the package.

# using npm
npm install --save @chanzuckerberg/eds

# or using Yarn
yarn add @chanzuckerberg/eds

Setting up EDS in your project

Import the EDS stylesheets somewhere in your app root, e.g. an init.ts or app.ts file:

import '@chanzuckerberg/eds/index.css'; // Includes relevant styles and tokens for EDS

Also, include this in your base / reset styles to allow configuation of the pixel-to-rem ratio:

html {
  font-size: calc(var(--eds-typography-base-size) * 1px); /* Sets the default pixel-to-rem ratio */
  /* also set a default html/body font family, if desired by using --eds-typography-font-family-1, etc. */
}

Lastly, add <link> or other files to load fonts into your project. EDS provides fallbacks for the three font families, and can support fonts from Adobe, Google, or other hosting / local sources:


<link rel="stylesheet" href="https://local-domain.org/fonts.css">


<link rel="stylesheet" href="https://use.typekit.net/<example>.css">


<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=<test-font-family...>" rel="stylesheet">

Theming Setup

For more information and configuration options, read the Theming Overview.

EDS Component Usage

Import any of the components from the top-level package:

// Import components by name at the top of your file
import { Heading } from '@chanzuckerberg/eds';

// ...and then use them in your React components:

<Heading preset="headline-lg">
  Coffee!
</Heading>

EDS provides a suite of components for use, and documentation for available props and overrides.

Development

This project is under active development. See CONTRIBUTING.md for more information on how to contribute to the Design System and IDE (VSCode) setup. Also, read our guidelines for additional information on how we build EDS components.

Instead, if you want to report an issue, you can open an issue.

This project is governed under the Contributor Covenant code of conduct.

Reporting Security Issues

See our Security Readme.

FAQ, More Information, and Support

Please review our Education Design System Site (SSO Required) here.

Code of Conduct

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to opensource@chanzuckerberg.com.

Extension points exported contracts — how you extend this code

CardCSSProperties (Interface)
(no doc)
src/components/Card/Card.tsx

Core symbols most depended-on inside this repo

assertEdsUsage
called by 21
src/util/logging.ts
createTestSourceFile
called by 17
src/bin/migrate/helpers.ts
transform
called by 17
src/bin/migrate/transforms/edit-jsx-prop.ts
isAliased
called by 8
bin/_util.js
setShadowStates
called by 7
src/components/ScrollWrapper/ScrollWrapper.tsx
_tokenNameToPath
called by 6
bin/_util.js
convertToPixels
called by 5
src/util/viewports.ts
getViewportWidths
called by 5
src/util/viewports.ts

Shape

Function 159
Method 19
Class 4
Interface 1

Languages

TypeScript100%

Modules by API surface

bin/_util.js23 symbols
src/components/DataTable/DataTable.tsx13 symbols
src/components/Modal/Modal.tsx9 symbols
src/components/AppHeader/AppHeader.tsx9 symbols
src/components/Menu/Menu.tsx8 symbols
src/components/Breadcrumbs/Breadcrumbs.tsx7 symbols
src/components/TabGroup/TabGroup.tsx6 symbols
src/components/Toggle/Toggle.tsx5 symbols
src/components/Select/Select.tsx5 symbols
src/components/Popover/Popover.tsx5 symbols
src/components/List/List.tsx5 symbols
src/components/Card/Card.tsx5 symbols

For agents

$ claude mcp add edu-design-system \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page