knotty (v2)
This is a style guide and directory of reusable components for Enwoven.
Swap between different branches here:
Here are some handy resources:

This is a style guide and directory of reusable components for Enwoven.
Swap between different branches here:
Here are some handy resources:
Prop name | Type | Default | Description |
---|---|---|---|
inputProps | object | Shape |
Prop name | Type | Default | Description |
---|---|---|---|
children | node | Required | |
label | string |
| |
maxItems | number | 5 | |
separator | string | > |
Prop name | Type | Default | Description |
---|---|---|---|
color | string | primary | |
isFlex | bool | false | |
isFullWidth | bool | false | |
isLoading | bool | false | |
outlined | bool | false | |
textAlign | enum | center | One of: center , left , right |
It's just a button, relax.
Prop name | Type | Default | Description |
---|---|---|---|
onRequestClose | func | Required | |
children | object | null | |
isOpen | bool | false | |
options | array | [] | |
subtitle | string |
| |
title | string |
|
Optional CTA's in top right title portion.
Adding some prefix text before CTA options.
Prop name | Type | Default | Description |
---|---|---|---|
onClick | func | Required | |
onRequestClose | func | Required | |
anchorElement | Element | null | |
closeOnClick | bool | true | |
disableScrollLock | bool | true | |
fillWidthOfAnchor | bool | false | |
items | shape[] | [] | icon : stringlabel : nodevalue : string |
maxItems | number | 0 | |
menuItemStyles | shape | Shape | |
minWidth | string | null | |
selectedValue | string | null | |
size | enum | medium | One of: small , medium |
By setting fillWidthOfAnchor
, it matches the width of the passed in anchorElement
;
Add some padding to menu items.
Menu items can also be a touch smaller with the size
attribute.
Combined with maxItems
, it can simulate a dropdown or select box.
Prop name | Type | Default | Description |
---|---|---|---|
action | node | null | |
closeTiming | null | ||
customTime | number | 3000 | |
inline | bool | false | |
isOpen | bool | false | |
message | string |
| |
onRequestClose | func | Function |
Notification
Prop name | Type | Default | Description |
---|---|---|---|
count | number | Required | The total number of pages. |
boundaryCount | number | 1 | Number of always visible pages at the beginning and end. |
className | string |
| Override or extend the styles applied to the component. |
color | enum | standard | The active color. One of: primary , secondary , standard |
hideNextButton | bool | false | If true, hide the next-page button. |
hidePrevButton | bool | false | If true, hide the previous-page button. |
onChange | func | Function | Callback fired when the page is changed.
Signature:
function(event: React.ChangeEvent |
page | number | 1 | The current page. |
shape | enum | circular | The shape of the pagination items. One of: circular , rounded |
showFirstButton | bool | false | If true, show the first-page button. |
showLastButton | bool | false | If true, show the last-page button. |
siblingCount | number | 1 | Number of always visible pages before and after the current page. |
size | enum | medium | The size of the component. One of: small , medium , large |
variant | enum | text | The variant to use. One of: outlined , text |
Prop name | Type | Default | Description |
---|---|---|---|
onSelect | func | Required | |
options | shape[] | Required | label : stringvalue : string |
addOptionPrefix | string | Add | |
freeSolo | bool | false | |
inputComponent | object | null | |
inputComponentProps | object | Shape | |
listboxComponent | elementType | ul | |
onAddOption | func | Function | |
onInputChange | func | Function | |
selectedOption | shape | null | label : stringvalue : string |
showAddOption | bool | false |
A wrapper for text inputs to provide autocomplete suggestions.
Created specifically for the Event selection input on Enwoven.
Use the updated text field.
Explore virtualization
Prop name | Type | Default | Description |
---|---|---|---|
onChange | func | null | |
options | shape[] | [] | label : stringvalue : custom |
orientation | enum | default | One of: default , vertical |
value | number | null |
Same as the first, vertical orientation:
Tabs can also be controlled by specifying both value
and onChange
props.
Prop name | Type | Default | Description |
---|---|---|---|
className | string |
| |
isLoading | bool | false | |
items | shape[] | [] | label : nodevalue : string |
showCheckboxes | bool | false |
putting something here would help, thanks
No, I don't like this
I am loading, thanks
Select something.
TextInput as multi-select.
Prop name | Type | Default | Description |
---|---|---|---|
title | string | Required |
Trees are nice, you should try them some time!
Prop name | Type | Default | Description |
---|---|---|---|
items | shape[] | [] | icon : stringlabel : nodevalue : string |
maxItems | number | 3 | |
moreIcon | union | fa-ellipsis-h | One of type: string, object |
moreText | string | More | |
moreTextOnLeft | bool | false | |
onClick | func | Function | |
textAlign | enum | center | One of: left , right , center |
A forever work in progress.
Prop name | Type | Default | Description |
---|---|---|---|
defaultAutoText | string |
| |
defaultAutoValue | string |
| |
initialValue | string |
| |
onChange | func | Function | |
textFieldProps | object | Shape |
The same DateInput, except with clickable link for default value
... with label:
Prop name | Type | Default | Description |
---|---|---|---|
isOpen | bool | Required | |
onRequestClose | func | Required |
Check your Drawers. Currently:
position: relative
set.Prop name | Type | Default | Description |
---|---|---|---|
onChange | func | Required | |
focusIcon | string | fa-search | |
initialIcon | string | fa-ellipsis-h | |
initialTitle | string | More options | |
options | shape[] | [] | name : stringvalue : stringgroup : stringicon : node |
Prop name | Type | Default | Description |
---|---|---|---|
backgroundColor | string | white | |
children | object | null | |
compactOnScroll | bool | false | |
elevation | number | 4 | |
leftChildren | object | null | |
logoIcon | string |
| |
logoImageUrl | string |
| |
logoName | string |
| |
menuItems | shape[] | [] | icon : stringlabel : nodevalue : string |
onClickLogo | func | null | |
onClickMenuItem | func | Function | |
onClickNotificationsIcon | func | null | |
onClickSearchIcon | func | null | |
onScrollProps | {} | ||
position | enum | fixed | One of: absolute , fixed , relative , static , sticky |
profileImageUrl | string |
| |
profileName | string |
| |
rightChildren | object | null | |
searchItems | shape[] | [] | icon : stringlabel : nodevalue : string |
showBottomBorder | bool | false | |
showNotificationBadge | bool | false | |
size | enum | default | One of: default , compact |
transparentBackground | false |
leftChildren
and rightChildren
props allow left and right side to have custom contents.
Background color option.
Prop name | Type | Default | Description |
---|---|---|---|
allowClearText | bool | true | |
allowLinkNewWindow | bool | false | |
allowMentions | bool | false | |
buttonList | enum[] | [
'bold', 'italic', 'underline', 'hyperlink', 'headline', 'blockquote',
'unordered-list', 'ordered-list',
] | |
disabled | bool | false | |
error | bool | false | |
height | union | 100% | One of type: number, string |
helpText | string |
| |
initialValue | union |
| Changing initialValue will reset the state, useful for reuse One of type: object, string |
initialValueRaw | object | null | |
isLoading | bool | false | |
label | string |
| |
limit | number | 0 | |
mentionOnAdd | func | Function | |
mentionOnClick | func | null | |
mentionSearchChange | func | Function | |
mentionSuggestions | array | [] | |
onChange | func | Function | |
onSave | func | Function | |
placeholder | string | Click here to enter text | |
statusText | string |
| |
transparent | bool | false | |
width | union | 100% | One of type: number, string |
... and some other stuff. The underlining and html tags are to test xss issues with input text parsing.
block this, yass.
and this two
one more for good luck
Saving text:
Circular progress spinner
Option to have links open in new window:
Setting transparent
will make the text input transparent with white text.
Raw data input from the text editor itself can be provied to a new instance of the editor via initialValueRaw
block this, yass.
and this two
one more for good luck
Prop name | Type | Default | Description |
---|---|---|---|
columns | array | [] | |
label | string |
| |
rows | array | [] |
Prop name | Type | Default | Description |
---|---|---|---|
disabled | bool | false | |
isLoading | bool | false | |
label | string |
| |
onChange | func | Function | |
onInputChange | func | Function | |
options | shape[] | [] | label : stringvalue : any |
placeholder | string | Tag input... | |
preferInlineLabel | bool | false | |
tags | shape[] | [] | label : stringvalue : any |
variant | enum | outlined | One of: outlined , standard , filled |
Another tag input, with inline label.
Prop name | Type | Default | Description |
---|---|---|---|
children | any | ||
forceColumnCount | number | null |
this is a grid, thank you.
Prop name | Type | Default | Description |
---|---|---|---|
actionBarProps | shape | Shape | moreIcon : stringmoreText : string |
children | any | null | |
cols | number | 4 | |
hasLayer | bool | false | |
icon | string |
| |
imageHref | string | null | |
imageUrl | string |
| |
items | shape[] | [] | icon : stringlabel : nodevalue : string |
maxItems | number | 3 | |
mediaChildren | any | null | |
mediaProps | object | null | |
onImageClick | func | Function | Callback function when someone clicks on the grid item image. |
onItemClick | func | Function | Callback function when someone clicks on an item in the bottom of the grid item |
onTitleClick | func | Function | |
overlayText | string |
| |
postFix | any | null | |
selected | bool | false | |
showActionBar | bool | true | |
showTitleText | bool | true | |
titleText | string |
| |
xs | number | 12 |
postFix
prop allows adding additional bits after each grid item.