Northwestern Libraries Design System

A global design system for NUL ReactJS UI components, intended for all front end applications, NPM modules, and user interfaces. Built with NextJS, Stitches UI, and packaged with Rollup. Inspired by Radix UI

Button

A Button

Button as a span

Example usage

import { Button } from '@nulib/design-system';
<Button isPrimary onClick={() => console.log("clicked")}>Ima Button</Button>

Props

NameTypeDescription
as
string
Element type
isDanger?
boolean
Color style
isLight?
boolean
Color style
isLowercase?
boolean
Text style
isPrimary?
boolean
Color style
isText?
boolean
Link style button

Button w/ Icon

A Button can wrap multiple elements. To use an icon, wrap your button text in a `span`

Example usage

import { Button, Icon } from '@nulib/design-system';
<Button>
<Icon isSmall>
<Icon.Add />
</Icon>
<span>Add Item</span>
</Button>

Northwestern Global Marketing footer

Example usage

import { Footer } from '@nulib/design-system';
<Footer />
// Custom background color
<Footer css={{ background: "pink" }}

Props

NameTypeDescription
isGrey
boolean
Grey background instead of purple

Icon

An Icon is a component that renders an SVG HTML element from a controlled set of Ionicon sourced icons.

Audio WorkAudio WorkImage Work

Example usage

import { Icon } from '@nulib/design-system';
<Icon isMedium>
<Icon.Title>Audio Work</Icon.Title>
<Icon.Audio />
</Icon>

Props

NameTypeDescription
isSmall?
boolean
Icon size (1x1)
isMedium?
boolean
Icon size (2x2)
isLarge?
boolean
Icon size (4x4)
NameTypeDescription
Add
<Icon.Add />
Add
Audio
<Icon.Audio />
Audio
Close
<Icon.Close />
Close
Image
<Icon.Image />
Image
Video
<Icon.Video />
Video

Notification

A Notification

Hey

Some message goes here and this is the default notification color/style

You have successfully completed some action
An info message. We might not even need this? But it shows notifications can be centered too
Warning: You can add a close button with the `isClosable` prop
Danger: this could be destructive

Example usage

import { Notification } from '@nulib/design-system';
<Notification isInfo>
<p><strong>Hey you!</strong></p>
<p>I want to tell you something</p>
</Notification>

Props

NameTypeDescription
isDanger?
boolean
Color style
isCentered?
boolean
Center the content of the Notification
isClosable?
boolean
Adds a close button, which lets the user close a Notification
isInfo?
boolean
Color style
isSuccess?
boolean
Color style
isWarning?
boolean
Color style

Placeholder

A Placeholder renders an element that extends to the bounds of its container. Children of placeholders can be textual, Icon components, or images, and are centered horizontally and vertically.

Audio Work
Oops There should be something here.
Scouts

Example usage

import { Placeholder } from '@nulib/design-system';
<Placeholder>
<Icon isLarge>
<Icon.Title>Audio Work</Icon.Title>
<Icon.Audio />
</Icon>
</Placeholder>
<Placeholder>
<strong>Oops</strong>
There should be something here.
</Placeholder>

Popover

A popover is a component that couples a trigger with some content that displays in an attached pane. When wrapping a Button component with Popover.Trigger, the as prop should be used on Buttons.

Example usage

import { Popover, Button } from '@nulib/design-system';
<Popover>
<Popover.Trigger>
<Button isPrimary as="span">Trigger Text</Button>
</Popover.Trigger>
<Popover.Content isPrimary>
<div style={{ height: "150px" }}>
<Placeholder>
<Icon isMedium>
<Icon.Image />
</Icon>
</Placeholder>
</div>
<p><strong>Primary</strong></p>
<p>Nullam nec diam velit. Duis pulvinar, mi at...</p>
<Button isLight isLowercase>
Quisque hendrerit
</Button>
</Popover.Content>
</Popover>

Props

NameTypeDescription
isPrimary?
boolean
Color style

Popover w/ Text Trigger

Popover Triggers can also wrap around text. Though not required this text should indicate to the user that it is actionable in some way.

import { Popover } from '@nulib/design-system';
<Popover>
<Popover.Trigger>
<a href="#">Text Popover</a>
</Popover.Trigger>
<Popover.Content>
<p>Fusce augue eros, convallis eget nunc...</p>
</Popover.Content>
</Popover>

Tag

A Tag

Hey hey
Ima warning
Published
Video
Info
Errors ingesting

Example usage

import { Tag } from '@nulib/design-system';
<Tag isSuccess>Published</Tag>

Props

NameTypeDescription
isDanger?
boolean
Color style
isInfo?
boolean
Color style
isPrimary?
boolean
Color style
isSuccess?
boolean
Color style
isWarning?
boolean
Color style

Tag w/ Icon

A Tag can wrap multiple Icon components. To use an icon, as the prop isIcon.

Video
import { Icon, Tag } from '@nulib/design-system';
<Tag isInfo isIcon>
<Icon>
<Icon.Video />
</Icon>
Video
</Tag>
NameTypeDescription
isIcon?
boolean
Layout style