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
A Button
import { Button } from '@nulib/design-system';<Button isPrimary onClick={() => console.log("clicked")}>Ima Button</Button>
Name | Type | Description |
---|---|---|
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 |
A Button can wrap multiple elements. To use an icon, wrap your button text in a `span`
import { Button, Icon } from '@nulib/design-system';<Button><Icon isSmall><Icon.Add /></Icon><span>Add Item</span></Button>
Northwestern Global Marketing footer
import { Footer } from '@nulib/design-system';<Footer />// Custom background color<Footer css={{ background: "pink" }}
Name | Type | Description |
---|---|---|
isGrey | boolean | Grey background instead of purple |
An Icon is a component that renders an SVG HTML element from a controlled set of Ionicon sourced icons.
import { Icon } from '@nulib/design-system';<Icon isMedium><Icon.Title>Audio Work</Icon.Title><Icon.Audio /></Icon>
Name | Type | Description |
---|---|---|
isSmall? | boolean | Icon size (1x1) |
isMedium? | boolean | Icon size (2x2) |
isLarge? | boolean | Icon size (4x4) |
Name | Type | Description |
---|---|---|
Add | <Icon.Add /> | |
Audio | <Icon.Audio /> | |
Close | <Icon.Close /> | |
Image | <Icon.Image /> | |
Video | <Icon.Video /> |
A Notification
Hey
Some message goes here and this is the default notification color/style
import { Notification } from '@nulib/design-system';<Notification isInfo><p><strong>Hey you!</strong></p><p>I want to tell you something</p></Notification>
Name | Type | Description |
---|---|---|
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 |
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.
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>
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.
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>
Name | Type | Description |
---|---|---|
isPrimary? | boolean | Color style |
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>
A Tag
import { Tag } from '@nulib/design-system';<Tag isSuccess>Published</Tag>
Name | Type | Description |
---|---|---|
isDanger? | boolean | Color style |
isInfo? | boolean | Color style |
isPrimary? | boolean | Color style |
isSuccess? | boolean | Color style |
isWarning? | boolean | Color style |
A Tag can wrap multiple Icon components. To use an icon, as the prop isIcon.
import { Icon, Tag } from '@nulib/design-system';<Tag isInfo isIcon><Icon><Icon.Video /></Icon>Video</Tag>
Name | Type | Description |
---|---|---|
isIcon? | boolean | Layout style |