Arrow
Arrow for use in dropdowns and other UI elements
<Button rounded={true}> Arrow <Arrow direction="down" /> </Button>
Variations
Prop | Type | Description |
---|---|---|
direction | oneOf(['up', 'down']) | Direction of arrow |
Avatar
A circular image for displaying user avatars
<Avatar size={48} src="http://lorempixel.com/64/64/cats" />
Prop | Type | Description |
---|---|---|
size | number | Width and height of image in pixels |
Badge
Component for displaying flash and error messages
Rebass0.2.0
<div> <Heading level={2}> Rebass <Space x={1} /> <Badge type="info"> 0.2.0 </Badge> </Heading> </div>
Variations
Prop | Type | Description |
---|---|---|
type | oneOf(['default', 'info', 'success', 'warning', 'error']) | Sets color based on type of badge |
Banner
Full-height banner with styling for background images
Rebass
<Banner align="center" backgroundImage="https://d262ilb51hltx0.cloudfront.net/max/2000/1*DZwdGMaeu-rvTroJYui6Uw.jpeg" > <Heading level={2} size={0} > Rebass </Heading> </Banner>
Prop | Type | Description |
---|---|---|
align | oneOf(['left', 'center', 'right']) | Horizontal alignment |
backgroundImage | string | Background image source |
Block
Generic box with visual styling
Block
Generic box for containing things
<Block borderLeft={true} color="blue" > <Media img="http://lorempixel.com/128/128/cats"> <Heading level={2} size={0} > Block </Heading> <Text> Generic box for containing things </Text> </Media> </Block>
Prop | Type | Description |
---|---|---|
color | string | Text color - can either be a key from the theme colors object or any color value |
backgroundColor | string | Background color - can either be a key from the theme colors object or any color value |
borderColor | string | Border color - can either be a key from the theme colors object or any color value |
border | bool | Adds a border |
borderTop | bool | Adds a border to the top side |
borderRight | bool | Adds a border to the right side |
borderBottom | bool | Adds a border to the bottom side |
borderLeft | bool | Adds a border to the left side |
m | oneOf([0, 1, 2, 3, 4]) | Applies margin based on the theme spacing scale |
mt | oneOf([0, 1, 2, 3, 4]) | Applies margin top based on the theme spacing scale |
mr | oneOf([0, 1, 2, 3, 4]) | Applies margin right based on the theme spacing scale |
mb | oneOf([0, 1, 2, 3, 4]) | Applies margin bottom based on the theme spacing scale |
ml | oneOf([0, 1, 2, 3, 4]) | Applies margin left based on the theme spacing scale |
mx | oneOf([0, 1, 2, 3, 4]) | Applies margin left and right based on the theme spacing scale |
my | oneOf([0, 1, 2, 3, 4]) | Applies margin top and bottom based on the theme spacing scale |
Breadcrumbs
Breadcrumb navigation links
<Breadcrumbs links={[{children: 'Jxnblk', href: '#!'}, {children: 'Rebass', href: '#!'}, {children: 'Breadcrumbs', href: '#!'}]} />
Prop | Type | Description |
---|---|---|
links * | array | Array of link props |
Button
A general purpose button element with customizable colors
<div> <Button rounded={true}> Button </Button> </div>
Variations
Prop | Type | Description |
---|---|---|
href | string | Pass an href prop to make the Button an <a> tag instead of a <button> |
color | string | Button color - can either be a key from the theme colors object or any color value |
backgroundColor | string | Background color - can either be a key from the theme colors object or any color value |
rounded | oneOfType([bool, oneOf(['top', 'right', 'bottom', 'left'])]) | Controls the border radius for creating button groups |
big | bool | Creates a larger button |
ButtonOutline
A general purpose outline style button element with customizable colors
<div> <ButtonOutline rounded="left"> Button </ButtonOutline> <ButtonOutline rounded={false} style={{marginLeft: -1}} > Group </ButtonOutline> <Button rounded="right" style={{marginLeft: -1}} > Button </Button> </div>
Variations
Prop | Type | Description |
---|---|---|
href | string | Pass an href prop to make the ButtonOutline an <a> tag instead of a <button> |
color | string | Text color |
rounded | oneOfType([bool, oneOf(['top', 'right', 'bottom', 'left'])]) | Controls the border radius for creating button groups |
big | bool | Creates a larger button |
Card
Styled box with border
<Card width={256}> <CardImage src="http://placehold.it/320" /> <Heading level={2} size={3} > Card </Heading> <Text> Cats like cards too </Text> </Card>
Prop | Type | Description |
---|---|---|
width | oneOfType([number, string]) | Width of card |
CardImage
Image for use within the Card component
<div style={{maxWidth: 192}}> <CardImage src="http://placehold.it/320" /> </div>
Prop | Type | Description |
---|---|---|
src * | string | Image source |
Checkbox
Checkbox input with label
<Checkbox label="Checkbox" name="checkbox_example" />
Prop | Type | Description |
---|---|---|
label * | string | Label for form element |
name * | string | Name attribute for form element |
Close
A button with an × for close and dismiss actions
<Close />
Container
Div with max-width and margin auto for centering content
<Container> Container </Container>
Divider
Styled hr element
<Divider />
Prop | Type | Description |
---|---|---|
compact | bool | Removes margin top and bottom |
Drawer
An off-canvas drawer component
<a href="demo"> See Demo Page </a>
Prop | Type | Description |
---|---|---|
size | number | Width or height of drawer, depending on placement |
open | bool | Shows and hides the drawer |
position | oneOf(['top', 'right', 'bottom', 'left']) | Position relative to the viewport |
Dropdown
Position relative container for positioning DropdownMenu component
<Block> <Dropdown> <Button rounded={true}> Dropdown <Arrow direction="down" /> </Button> <DropdownMenu open={true}> <NavItem Component="a"> Hello </NavItem> <NavItem Component="a"> Hi </NavItem> </DropdownMenu> </Dropdown> </Block>
DropdownMenu
Absolutely positioned Menu component for use within Dropdown component
<a href="#Dropdown"> See Dropdown Example </a>
Prop | Type | Description |
---|---|---|
open | bool | Toggles visibility of DropdownMenu |
right | bool | Anchors menu to the right |
top | bool | Anchors menu to the top |
Embed
Responsive media embed wrapper
<Embed ratio={0.5625}> <iframe allowFullScreen={true} src="https://www.youtube.com/embed/658WsCFwm9A" /> </Embed>
Prop | Type | Description |
---|---|---|
ratio | number | Aspect ratio for the embed. Divide height over width to calculate. E.g. ratio={9/16} |
Heading
Heading element with no margin and size based on fontSizes scale
Variations
Heading
Heading
Heading
Heading
Heading
Heading
Prop | Type | Description |
---|---|---|
level | oneOf([1, 2, 3, 4, 5, 6]) | Heading level, e.g. level={1} for <h1> |
size | oneOf([0, 1, 2, 3, 4, 5, 6]) | Visual size of heading |
HeadingLink
Heading element with unstyled link. Useful for in-page navigation
Prop | Type | Description |
---|---|---|
level | oneOf([1, 2, 3, 4, 5, 6]) | Heading level, e.g. level={1} for <h1> |
size | oneOf([1, 2, 3, 4, 5, 6]) | Visual size of heading |
href | string | href for link |
Input
Input element with label
<Input label="Input" name="input_example" placeholder="Placeholder" rounded={true} type="text" />
Variations
Prop | Type | Description |
---|---|---|
label * | string | Label for form element |
name * | string | Name attribute for form element |
type | string | Form element type |
hideLabel | bool | Hides the form element label |
rounded | oneOfType([bool, oneOf(['top', 'right', 'bottom', 'left'])]) | Controls the border radius for creating grouped elements |
InputRange
Input type range with label
Variations
Prop | Type | Description |
---|---|---|
label * | string | Label for form element |
name * | string | Name attribute for form element |
hideLabel | bool | Hides the form element label |
Label
Label element for form controls
<Label> Label for form elements </Label>
Prop | Type | Description |
---|---|---|
hide | bool | Accessibly hide label for use in high density UI. This can still cause accessibility issues. Use this with caution. |
Media
Media object with vertical alignment using flexbox
Media Object
With alignment options
<Media align="center" img="http://placehold.it/128" > <Heading level={3}> Media Object </Heading> <Text> With alignment options </Text> </Media>
Variations
Prop | Type | Description |
---|---|---|
img | string | Image source |
right | bool | Displays image to the right |
align | oneOf(['top', 'center', 'bottom']) | Vertical alignment |
Menu
Menu component for navigation links and actions
<Menu> <NavItem Component="a"> Menu </NavItem> <NavItem Component="a"> NavItem </NavItem> <NavItem Component="a"> NavItem </NavItem> </Menu>
Message
Component for displaying flash and error messages
<Message type="success"> Hello Message! <Space auto={true} x={1} /> <Close /> </Message>
Variations
Prop | Type | Description |
---|---|---|
type | oneOf(['default', 'info', 'success', 'warning', 'error']) | Sets color based on type of message |
PageHeader
Main page header with description
Page Header
Description about the page
<PageHeader description="Description about the page" heading="Page Header" />
Prop | Type | Description |
---|---|---|
heading | string | Page heading |
description | string | Description of page |
Panel
Panel for containing small pieces of information
Panels are great for visually separating UI, content, or data from the rest of the page.
<Panel type="info"> <PanelHeader type="default"> Panel </PanelHeader> <Text> Panels are great for visually separating UI, content, or data from the rest of the page. </Text> <PanelFooter type="default"> The footer is a good place for less important information </PanelFooter> </Panel>
Variations
Prop | Type | Description |
---|---|---|
type | oneOf(['default', 'info', 'success', 'warning', 'error']) | Sets border color based on type of panel |
PanelHeader
Header for Panel component with vertical centering using flexbox
Variations
Prop | Type | Description |
---|---|---|
type | oneOf(['default', 'info', 'success', 'warning', 'error']) | Sets background color based on the type of panel |
Pre
Pre element for displaying code examples
const pre = { preformatted: 'text' }
<Pre> const pre = { preformatted: 'text' } </Pre>
Progress
Progress element
<Progress value={0.25} />
Prop | Type | Description |
---|---|---|
value | number | Value for progress bar |
Radio
Radio input with label
<Radio label="Radio" name="radio_example" />
Prop | Type | Description |
---|---|---|
label * | string | Label for form element |
name * | string | Name attribute for form element |
Section
Section element with vertical padding
<Section> Section </Section>
SectionHeader
Header for section elements
Section Header
With linked header
<Section> <SectionHeader description="With linked header" heading="Section Header" /> Section </Section>
Prop | Type | Description |
---|---|---|
heading | string | Section heading |
href | string | Link to section, used in HeadingLink |
description | string | Description of section |
Select
Select form control with label
<Select label="Select" name="select_example" options={[{label: 'Two', value: 2}, {label: 'Four', value: 4}, {label: 'Eight', value: 8}, {label: 'Sixteen', value: 16}, {label: 'Thirty-Two', value: 32}, {label: 'Sixty-Four', value: 64}]} />
Variations
Prop | Type | Description |
---|---|---|
label * | string | Label for form element |
name * | string | Name attribute for form element |
options * | array | Options for select |
hideLabel | bool | Hides the form element label |
Space
Inline-block element for adding space between elements
<div> <Button rounded={true}> Button </Button> <Space x={1} /> <Button rounded={true}> With </Button> <Space x={4} /> <Button rounded={true}> Space </Button> </div>
Prop | Type | Description |
---|---|---|
x | oneOf([1, 2, 3, 4]) | Width of space based on the spacing scale |
auto | bool | Sets flex: 1 1 auto |
Text
Component for displaying text in UI
Variations
Text
Text
Prop | Type | Description |
---|---|---|
small | bool | Sets a smaller font size |
Textarea
Textarea form element with label
Variations
Prop | Type | Description |
---|---|---|
label * | string | Label for form element |
name * | string | Name attribute for form element |
hideLabel | bool | Hides the form element label |
Toolbar
Toolbar component that vertically centers children with display flex
<Toolbar> <NavItem Component="a"> Toolbar </NavItem> <NavItem Component="a"> NavItem </NavItem> <Space auto={true} x={1} /> <NavItem Component="a"> NavItem </NavItem> </Toolbar>
Tooltip
Styled tooltip that shows on hover
Tooltip
<Tooltip title="Hello!"> <Heading level={3}> Tooltip </Heading> </Tooltip>
Prop | Type | Description |
---|---|---|
title | string | Text to display in tooltip |