Porunga - Another React UI Library

Porgunga

Porunga is an another ReactJS UI library!

We hope to deliver an easy to use component API that can be easily extendable to fit the functional and design needs for multiple platforms and audiences.

To ensure transpareny across the library and a consistent API, the following is a set of guidelines to follow in terms of approaching the design of the API.

Composition

Using the children property is the idiomatic way to do composition with React.

Using props.children is a great way to provide composition with our genereic components, however, there will be some cases where a component may benefit in only expecting explicit properties.

For the most part, API consistency matters.

Avoid spreads

For now, lets try and keep the use of spread operators sparingly for props on a component.

boolean vs enum

Boolean props can benefit from it's shorthand usage; you can specify them without a value.

type Props = {
  large: boolean;
}

<Button large>SIGN UP NOW!</Button>

//is the same as...

<Button large={true}>SIGN UP NOW!</Button>

If they are included, it's true. If they aren't, it's false (unless stated otherwise in your default values).

The main issue is when you use these boolean props for size, variants, colours that need more than a on or off.

type Props = {
  large: boolean
  small: boolean
  primary: boolean
  secondary: boolean
  disabled: boolean
}
<Button large small primary secondary disabled>
  WUT?
</Button>

Instead of adding multiple props trying to fight for handling similar things we can make use of enums when needed.

type Props = {
  size: 'small' | 'medium' | 'large'
  variant: 'primary' | 'secondary'
  disabled: boolean
}
<Button variant="primary" size="large" disabled>
  Primary Large Disabled Button here
</Button>

The extra benefits include a more verbose API that can also handle more values when neeeded, while keeping boolean props for values that only require to be on or off.

Give sufficient defaults

Whenever a prop is not required in a component, a sufficient defualt should be provided to minimize the amount of props needed to pass for a component to be used.

An example could be if an optional prop is a string type value, give a default value of an empty string. This will prevent having to deal with undefined or null values.

Don't rename HTML attributes

HTML attributes already exist. Developers shouldn't have to learn a superset of HTML attributes to use the library.

If we want to give access to aria-label, we should give them access to that attribute through it's existing name unlike creating our own language like screenReaderLabel.

Keep in mind when defining props for the components to not override an existing attribute name.

type Props = {
  type: string
}
<Button type="primary">SIGN UP NOW!</Button>

type here is a prop defined to handle a potentially arbiturary rule in the library, meanwhile type is already an HTML attribute that the <button /> element takes that can be submit,button,reset that does it's own stuff.

Ultimately, this would end up causing confusion and unexpected behaviour.

Don't rename CSS properties

On the counter-part to renaming HTML attributes, if a component is given explicit control over a css property styling like backgroundColor through a prop, the prop should also be named backgroundColor instead of something like bgColor.

The latter may be shorter, but it creates a mapping of terminology that isn't quite 1:1.

The first option should keep the API more predictable with explicit styling.

Write types and follow JSDoc comments

With the library using TypeScrpt, you many have a hard time trying to not use types, but it's important to note types are important.

JSDoc standard comments are also beneficial not only for providing a standard for commenting, but the package styleguidist uses these types and JSDoc comments to generate documenttion for our components in it's styleguide.

Make it nice!

Let's make a dope component library!

The theme is responsible for containing global style key values like a colour pallete, and component specific style options like the font sizes of a Heading or Paragraph.

With a theme in place, every component has a common language in how it retrieves it's type and magnitude of styling, aswell as giving the developer a common language when using the available props for each component.

{
  "root": {
    "colors": {
      "brand": "#E8325A",
      "accent-1": "#216CA9",
      "accent-2": "#916364",
      "accent-3": "#6EB785",
      "accent-4": "#745AAA",
      "neutral-1": "#0a4c83",
      "neutral-2": "#5b3132",
      "neutral-3": "#21703a",
      "neutral-4": "#2e1465",
      "error": "#FF4040",
      "warning": "#FFAA15",
      "success": "#00C781",
      "unknown": "#CCCCCC",
      "disabled": "#CCCCCC",
      "light-1": "#F8F8F8",
      "light-2": "#F2F2F2",
      "light-3": "#EDEDED",
      "light-4": "#DADADA",
      "light-5": "#DADADA",
      "light-6": "#DADADA",
      "dark-1": "#333333",
      "dark-2": "#555555",
      "dark-3": "#777777",
      "dark-4": "#999999",
      "dark-5": "#999999",
      "dark-6": "#999999",
      "transparent": "transparent"
    },
    "spacing": {
      "xxsmall": "3px",
      "xsmall": "5px",
      "small": "10px",
      "medium": "20px",
      "large": "40px",
      "xlarge": "60px",
      "xxlarge": "80px",
      "auto": "auto",
      "unset": ""
    },
    "borderSizes": {
      "xxsmall": "1px",
      "xsmall": "2px",
      "small": "3px",
      "medium": "5px",
      "large": "10px",
      "xlarge": "20px",
      "xxlarge": "40px",
      "unset": ""
    },
    "sizes": {
      "xxsmall": "40px",
      "xsmall": "80px",
      "small": "160px",
      "medium": "320px",
      "large": "640px",
      "xlarge": "960px",
      "xxlarge": "1280px",
      "1/2": "50%",
      "1/3": "33.33%",
      "2/3": "66.66%",
      "1/4": "25%",
      "2/4": "50%",
      "3/4": "75%",
      "full": "100%",
      "auto": "auto",
      "unset": ""
    },
    "shadows": {
      "xsmall": "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
      "small": "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
      "medium": "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
      "large": "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
      "xlarge": "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
      "unset": ""
    },
    "isAllRounded": false
  },
  "paragraph": {
    "sizes": {
      "xxsmall": "11px",
      "xsmall": "12px",
      "small": "14px",
      "medium": "16px",
      "large": "18px",
      "xlarge": "20px",
      "xxlarge": "24px"
    }
  },
  "text": {
    "sizes": {
      "xxsmall": "xx-small",
      "xsmall": "x-small",
      "small": "small",
      "medium": "medium",
      "large": "large",
      "xlarge": "x-large",
      "xxlarge": "xx-large"
    },
    "weights": {
      "normal": "normal",
      "bold": "bold",
      "bolder": "bolder",
      "lighter": "lighter",
      100: "100",
      200: "200",
      300: "300",
      400: "400",
      500: "500",
      600: "600",
      700: "700",
      800: "800",
      "unset": ""
    },
    "styles": {
      "normal": "normal",
      "italic": "italic",
      "oblique": "oblique",
      "inherit": "inherit",
      "initial": "initial",
      "unset": "unset"
    }
  },
  "heading": {
    "sizes": {
      "xxsmall": "3px",
      "xsmall": "5px",
      "small": "10px",
      "medium": "20px",
      "large": "40px",
      "xlarge": "60px",
      "xxlarge": "80px",
      "unset": ""
    }
  },
  "box": {
    "rounded": "24px"
  },
  "button": {
    "rounded": "24px"
  },
  "badge": {
    "rounded": "24px"
  },
  "checkbox": {
    "rounded": "12px"
  },
  "progressBar": {
    "rounded": "24px"
  },
  "input": {
    "rounded": "24px"
  }
}

Currently using Porunga, the provided theme wrapper component must be wrapped around the root of a react app for it's styles to function as intended. A default theme is applied when no theme prop value is assigned.

I'm a brand colour Heading

When passing a theme object into the provided wrapper, the given theme object will merge with the default theme so that you only need to change exactly what you want.

I'm a brand colour Heading

src/components/Avatar/index.ts
Prop nameTypeDefaultDescription
altstring
bgColorenum
One of: brand, accent-1, accent-2, accent-3, accent-4, neutral-1, neutral-2, neutral-3, neutral-4, error, warning, success, unknown, disabled, light-1, light-2, light-3, light-4, light-5, light-6, dark-1, dark-2, dark-3, dark-4, dark-5, dark-6, transparent
containerPropsany
imgSrcstring
onClickany
propsany
roundboolean
sizeenum
One of: xxsmall, xsmall, small, medium, large, xlarge, xxlarge, 1/2, 1/3, 2/3, 1/4, 2/4, 3/4, full, auto, unset
textstring
textColorenum
One of: brand, accent-1, accent-2, accent-3, accent-4, neutral-1, neutral-2, neutral-3, neutral-4, error, warning, success, unknown, disabled, light-1, light-2, light-3, light-4, light-5, light-6, dark-1, dark-2, dark-3, dark-4, dark-5, dark-6, transparent
KB
src/components/Badge/index.ts
Prop nameTypeDefaultDescription
iconany

An optional icon to display

roundedRounded

How round the corners are of the box

textstring

The text to display in the badge

variantenum

The background color of the badge

One of: brand, accent-1, accent-2, accent-3, accent-4, neutral-1, neutral-2, neutral-3, neutral-4, error, warning, success, unknown, disabled, light-1, light-2, light-3, light-4, light-5, light-6, dark-1, dark-2, dark-3, dark-4, dark-5, dark-6, transparent

Badges

NiceNiceNiceNiceNiceNiceNice
Nice RoundNice RoundNice RoundNice RoundNice RoundNice RoundNice Round
src/components/Box/index.ts
Prop nameTypeDefaultDescription
alignContentenum

How to align the contents when there is extra space in the cross axis.

One of: flex-start, center, flex-end, space-around, space-between, stretch
alignItemsenum

How to align the contents along the cross axis.

One of: flex-start, center, flex-end, stretch, baseline
alignSelfenum

How to align along the cross axis when contained in a Box or along the column axis when contained in a Grid.

One of: flex-start, center, flex-end, stretch, baseline
asstring | Function

The DOM tag or react component to use for the element.

backgroundColorenum

A backgroundColor identifier

One of: brand, accent-1, accent-2, accent-3, accent-4, neutral-1, neutral-2, neutral-3, neutral-4, error, warning, success, unknown, disabled, light-1, light-2, light-3, light-4, light-5, light-6, dark-1, dark-2, dark-3, dark-4, dark-5, dark-6, transparent
basisenum

A fixed or relative size along its container's main axis.

One of: xxsmall, xsmall, small, medium, large, xlarge, xxlarge, 1/2, 1/3, 2/3, 1/4, 2/4, 3/4, full, auto, unset
borderColorenum

A borderColor identifier

One of: brand, accent-1, accent-2, accent-3, accent-4, neutral-1, neutral-2, neutral-3, neutral-4, error, warning, success, unknown, disabled, light-1, light-2, light-3, light-4, light-5, light-6, dark-1, dark-2, dark-3, dark-4, dark-5, dark-6, transparent
borderStyleenum

A borderStyle identifier

One of: none, solid, dashed, dotted, double, groove, ridge, inset, outset, hidden
borderWidthenum

A size identifier

One of: xxsmall, xsmall, small, medium, large, xlarge, xxlarge, 1/2, 1/3, 2/3, 1/4, 2/4, 3/4, full, auto, unset
childrenany

Content inside the Box element

directionenum

Specifies the direction of the child items

One of: row, row-reverse, column, column-reverse
grownumber

How much of the remaining space in the flex container should be assigned to the box

heightenum

The fixed height

One of: xxsmall, xsmall, small, medium, large, xlarge, xxlarge, 1/2, 1/3, 2/3, 1/4, 2/4, 3/4, full, auto, unset
justifyContentenum

How to align the contents along the main axis.

One of: flex-start, center, flex-end, space-around, space-between, stretch, space-evenly
margin"xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "full" | "auto" | "unset" | DirectionsSizes

The amount of margin around the box contents. DirectionSizes: {t: enum, r: enum, l: enum, b: enum}

padding"xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "full" | "auto" | "unset" | DirectionsSizes

The amount of padding around the box contents. DirectionSizes: {t: enum, r: enum, l: enum, b: enum}

propsany

Any extra properties to pass to the Box

roundedRounded

How round the corners are of the box

shadowenum

The amount of box shadow applied to box

One of: xxsmall, xsmall, small, medium, large, xlarge, xxlarge, 1/2, 1/3, 2/3, 1/4, 2/4, 3/4, full, auto, unset
shrinknumber

If the size of all flex items is larger than the flex container, items shrink to fit accordingly

widthenum

The fixed width

One of: xxsmall, xsmall, small, medium, large, xlarge, xxlarge, 1/2, 1/3, 2/3, 1/4, 2/4, 3/4, full, auto, unset
wrapenum

Specifies if child elements should fall to a new row if they don't fit

One of: wrap, wrap-reverse, no-wrap

Default Box

box
box
box

Column direction Box

box
box
box

Wrap Box

box
box
box
box
box
box
box
src/components/Button/index.ts

Button

Prop nameTypeDefaultDescription
labelstringRequired
classNamestring
disabledboolean
isOutlineboolean
onClick() => any

Content inside the button element

primaryColorenum
One of: disabled, brand, accent-1, accent-2, accent-3, accent-4, neutral-1, neutral-2, neutral-3, neutral-4, error, warning, success, unknown, light-1, light-2, light-3, light-4, light-5, light-6, dark-1, dark-2, dark-3, dark-4, dark-5, dark-6, transparent
roundedRounded
secondaryColorenum
One of: disabled, brand, accent-1, accent-2, accent-3, accent-4, neutral-1, neutral-2, neutral-3, neutral-4, error, warning, success, unknown, light-1, light-2, light-3, light-4, light-5, light-6, dark-1, dark-2, dark-3, dark-4, dark-5, dark-6, transparent

Default Button

src/components/Card/index.ts
Prop nameTypeDefaultDescription
childrenany

Content inside Card's content section

footerTextstring

Small muted text under card content

heroImage{ position: "left" | "right" | "top"; alt: string; src: string; srcSet?: string; sizes?: string; }

An object of image data that will render on top of the card

roundedboolean

Whether or not to round the corners to the theme's specifcations

titlestring

The main title in the card content area

titleAlignenum

Horizontal alignment of title

One of: left, center, right, justify

Nostrud incididunt minim occaecat aliqua nostrud eu nulla magna.

Consequat enim eiusmod qui cupidatat. Do enim incididunt aute pariatur enim nulla sunt ea minim. Dolore mollit dolore ex veniam anim. Consectetur labore dolore minim duis magna deserunt pariatur irure consequat. Laborum eiusmod ipsum et velit quis laborum labore laboris eu deserunt dolor dolore elit.
Commodo nostrud sit veniam mollit esse sunt.

Card with Hero Image

building-blocks

Nostrud incididunt minim occaecat aliqua nostrud eu nulla magna.

Consequat enim eiusmod qui cupidatat. Do enim incididunt aute pariatur enim nulla sunt ea minim. Dolore mollit dolore ex veniam anim. Consectetur labore dolore minim duis magna deserunt pariatur irure consequat. Laborum eiusmod ipsum et velit quis laborum labore laboris eu deserunt dolor dolore elit.
Commodo nostrud sit veniam mollit esse sunt.

heroImage position

building-blocks

Nostrud incididunt minim occaecat aliqua nostrud eu nulla magna.

Consequat enim eiusmod qui cupidatat. Do enim incididunt aute pariatur enim nulla sunt ea minim. Dolore mollit dolore ex veniam anim. Consectetur labore dolore minim duis magna deserunt pariatur irure consequat. Laborum eiusmod ipsum et velit quis laborum labore laboris eu deserunt dolor dolore elit.
Commodo nostrud sit veniam mollit esse sunt.
src/components/Checkbox/index.ts

Checkbox

Prop nameTypeDefaultDescription
labelstringRequired
checkedboolean
classNamestring
disabledboolean
idstring
namestring
onChange(isChecked: boolean) => any

Content inside the checkbox element

primaryColorenum
One of: disabled, brand, accent-1, accent-2, accent-3, accent-4, neutral-1, neutral-2, neutral-3, neutral-4, error, warning, success, unknown, light-1, light-2, light-3, light-4, light-5, light-6, dark-1, dark-2, dark-3, dark-4, dark-5, dark-6, transparent
roundedRounded

Default Checkbox

src/components/Heading/index.ts

Heading

Prop nameTypeDefaultDescription
childrenanyRequired

Content inside the Heading element

ariaLabelstring

aria-label will be added to the element and used by screen readers

classNamestring

Class attribute for Heading element

colorenum

The color of text using an identifier

One of: brand, accent-1, accent-2, accent-3, accent-4, neutral-1, neutral-2, neutral-3, neutral-4, error, warning, success, unknown, disabled, light-1, light-2, light-3, light-4, light-5, light-6, dark-1, dark-2, dark-3, dark-4, dark-5, dark-6, transparent
levelenum

Heading Level

One of: h1, h2, h3, h4, h5, h6
sizeenum

Font size of Heading using an identitfier

One of: xxsmall, xsmall, small, medium, large, xlarge, xxlarge, 1/2, 1/3, 2/3, 1/4, 2/4, 3/4, full, auto, unset
textAlignenum

Alignment of text inside

One of: left, center, right, justify

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Centered Heading

src/components/Input/index.ts
Prop nameTypeDefaultDescription
borderColorActivestring

The border color for the input when active

borderColorInactivestring

The border color for the input when inactive

bottomTextstring

Helper text to show below the input

bottomTextPropsany

Any extra properties to pass to the bottom text

containerPropsany

Any extra properties to pass to the container

disabledboolean

Whether or not the input is disabled

hideLabelboolean

Whether or not to hide the label

idstring

The id for the input (can't enforce they send this, so generate a random one by default)

labelstring

The text label for the input

labelPropsany

Any extra properties to pass to the label

maxLengthstring

The maximum length of the input field

minLengthstring

The minimum length of the input field

namestring

The name of the input

onBlur() => {}

A callback function for the on blur event

onChange() => {}

A callback function for the on change event

onClick() => {}

A callback function for the on click event

onFocus() => {}

A callback function for the on focus event

onKeyDown() => {}

A callback function for the on click event

patternstring

A regex pattern to check

placeholderstring

The input placeholder text

propsany

Any extra properties to pass to the input

readOnlyboolean

Whether or not the input is read only

requiredboolean

Whether or not the input is required

roundedRounded

Optionally round the edges

tabIndexstring

The tab index for the input

titlestring

The input title (the tooltip that comes up when validation fails)

typeenum

The type of the input

One of: number, text, password, datetime, datetime-local, date, month, time, week, email, url, search, tel, color
valuestring

The value of the input

Default Input

Input (Placeholder)

Input (Disabled)

Input (Required)

Input (Bottom Text)

The user's first name

Input (Border Color)

Input (Alternate Types)

Input (Pattern Matching)

src/components/Paragraph/index.ts

Paragraph

Prop nameTypeDefaultDescription
childrenanyRequired

Content inside Paragraph component

classNamestring

Class attribute for paragraph

colorenum

Color of text

One of: brand, accent-1, accent-2, accent-3, accent-4, neutral-1, neutral-2, neutral-3, neutral-4, error, warning, success, unknown, disabled, light-1, light-2, light-3, light-4, light-5, light-6, dark-1, dark-2, dark-3, dark-4, dark-5, dark-6, transparent
sizeenum

Font size of text

One of: xxsmall, xsmall, small, medium, large, xlarge, xxlarge, 1/2, 1/3, 2/3, 1/4, 2/4, 3/4, full, auto, unset
textAlignenum

Alignment of text inside paragraph

One of: left, center, right

Id labore commodo velit ut adipisicing tempor amet. Incididunt sunt aute quis consequat adipisicing dolore culpa irure aliquip aliquip labore. Nisi fugiat proident cupidatat officia.

Id labore commodo velit ut adipisicing tempor amet. Incididunt sunt aute quis consequat adipisicing dolore culpa irure aliquip aliquip labore. Nisi fugiat proident cupidatat officia.

Id labore commodo velit ut adipisicing tempor amet. Incididunt sunt aute quis consequat adipisicing dolore culpa irure aliquip aliquip labore. Nisi fugiat proident cupidatat officia.

Id labore commodo velit ut adipisicing tempor amet. Incididunt sunt aute quis consequat adipisicing dolore culpa irure aliquip aliquip labore. Nisi fugiat proident cupidatat officia.

src/components/ProgressBar/index.ts

The ProgressBar component allows the user to create a flexible progress bar for use in everything from loading states to step counters. You can choose to show the current percent, a custom value, or add an optional rounding for the borders of the progress bar.

Prop nameTypeDefaultDescription
classNamestring

Optional class name

colorenum

The color of the progress bar

One of: brand, accent-1, accent-2, accent-3, accent-4, neutral-1, neutral-2, neutral-3, neutral-4, error, warning, success, unknown, disabled, light-1, light-2, light-3, light-4, light-5, light-6, dark-1, dark-2, dark-3, dark-4, dark-5, dark-6, transparent
customTextstring

Text to display if custom

roundedRounded

Optionally round the progress bar

showValueboolean

Whether to add text in the progress bar

textColorstring

Sets text color

valuenumber

The value of the progress bar (as percentage)

Default Progress Bar

Progress Bar Pallete

Progress Bar Rounded

Progress Bar With Percentage Text

Progress Bar With Custom Text

src/components/RadioButton/index.ts

RadioButton

Prop nameTypeDefaultDescription
namestringRequired

A name identifier

valuestringRequired

A value identifier

ariaDescribedBystring

aria-label will be added to the element and used by screen readers

backgroundColorenum

A backgroundColor identifier

One of: brand, accent-1, accent-2, accent-3, accent-4, neutral-1, neutral-2, neutral-3, neutral-4, error, warning, success, unknown, disabled, light-1, light-2, light-3, light-4, light-5, light-6, dark-1, dark-2, dark-3, dark-4, dark-5, dark-6, transparent
checkedboolean

A checked identifier

childrenany

Content inside the RadioButton element

classNamestring

Class attribute

colorenum

The color of text using an identifier

One of: brand, accent-1, accent-2, accent-3, accent-4, neutral-1, neutral-2, neutral-3, neutral-4, error, warning, success, unknown, disabled, light-1, light-2, light-3, light-4, light-5, light-6, dark-1, dark-2, dark-3, dark-4, dark-5, dark-6, transparent
disabledboolean

A disabled identifier

labelstring

A label identifier

onClick(event: SyntheticEvent<Element, Event>) => void

Event handler for onClick action

Default RadioButton

src/components/Select/index.ts
Prop nameTypeDefaultDescription
optionsOption[]Required

option elements inside Select {label: string, value: string, selected?: boolean, disabled?: boolean}

defaultLabelstring

The default label selected

onChange(change: { option: { value: string | number; label: string; }; }) => any

The interface for capturing values of selected option during the select onChange event

primaryColorenum

The primary color to use from the theme palette

One of: brand, accent-1, accent-2, accent-3, accent-4, neutral-1, neutral-2, neutral-3, neutral-4, error, warning, success, unknown, disabled, light-1, light-2, light-3, light-4, light-5, light-6, dark-1, dark-2, dark-3, dark-4, dark-5, dark-6, transparent
roundedRounded

Whether to round the edges based off of the theme config

secondaryColorenum

The secondary color to use from the theme palette

One of: brand, accent-1, accent-2, accent-3, accent-4, neutral-1, neutral-2, neutral-3, neutral-4, error, warning, success, unknown, disabled, light-1, light-2, light-3, light-4, light-5, light-6, dark-1, dark-2, dark-3, dark-4, dark-5, dark-6, transparent
shadowenum

The amount of box shadow applied to box

One of: xxsmall, xsmall, small, medium, large, xlarge, xxlarge, 1/2, 1/3, 2/3, 1/4, 2/4, 3/4, full, auto, unset

Default Select

Default Select

Select Palette

Select Palette Rounded

src/components/Skeleton/index.ts
Prop nameTypeDefaultDescription
animateboolean

If true, Skeleton background will animate

childrenany

Content inside the Skeleton element

propsany

Any additional props for Skeleton

src/components/Spinner/index.ts
Prop nameTypeDefaultDescription
primaryColorenum

The primary color to use from the theme palette

One of: brand, accent-1, accent-2, accent-3, accent-4, neutral-1, neutral-2, neutral-3, neutral-4, error, warning, success, unknown, disabled, light-1, light-2, light-3, light-4, light-5, light-6, dark-1, dark-2, dark-3, dark-4, dark-5, dark-6, transparent
sizeenum

The size of the spinner. Defaults to small

One of: xxsmall, xsmall, small, medium, large, xlarge, xxlarge, 1/2, 1/3, 2/3, 1/4, 2/4, 3/4, full, auto, unset
type"solid"

Type of spinner to use. Defaults to solid

src/components/Text/index.ts

Text

Prop nameTypeDefaultDescription
childrenanyRequired

Content inside Text component

classNamestring

Class attribute for text

colorenum

Color of text

One of: brand, accent-1, accent-2, accent-3, accent-4, neutral-1, neutral-2, neutral-3, neutral-4, error, warning, success, unknown, disabled, light-1, light-2, light-3, light-4, light-5, light-6, dark-1, dark-2, dark-3, dark-4, dark-5, dark-6, transparent
familystring

Font family of text

sizeenum

Font size of text

One of: xxsmall, xsmall, small, medium, large, xlarge, xxlarge, 1/2, 1/3, 2/3, 1/4, 2/4, 3/4, full, auto, unset
styleenum

Font style of text

One of: unset, normal, inherit, initial, italic, oblique
weightenum

Font weight of text

One of: unset, normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800, inherit, initial
Text 1Text 2Text 3Text 4Text 5Text 6Text 7Text 8
src/components/TextArea/index.ts

TextArea

Prop nameTypeDefaultDescription
borderColorenum

A borderColor identifier

One of: brand, accent-1, accent-2, accent-3, accent-4, neutral-1, neutral-2, neutral-3, neutral-4, error, warning, success, unknown, disabled, light-1, light-2, light-3, light-4, light-5, light-6, dark-1, dark-2, dark-3, dark-4, dark-5, dark-6, transparent
childrenany

Content inside the TextArea element

colsnumber

Specifies the visible width of a text area

disabledboolean

Specifies that a text area should be disabled

maxlengthnumber

Specifies the maximum number of characters allowed in the text area

placeholderstring

Specifies a short hint that describes the expected value of a text area

rowsnumber

Specifies the visible number of lines in a text area

Default TextArea

src/components/Theme/index.ts
Prop nameTypeDefaultDescription
childrenanyRequired

Content inside the Theme Wrapper

themeThemeConfig

Custom theme config object