Properties

System Properties

We provide a set of out of style functions out of the box through the animus builder from @animus-ui/core that are standardized throughout all of our components.

Layout

Prop
Properties
Scale
display
display
undefined
overflow
overflow
undefined
overflowX
overflow-x
undefined
overflowY
overflow-y
undefined
size
width, height
undefined
width
width
undefined
minWidth
min-width
undefined
maxWidth
max-width
undefined
height
height
undefined
minHeight
min-height
undefined
maxHeight
max-height
undefined
verticalAlign
vertical-align
undefined
justifySelf
justify-self
undefined
alignSelf
align-self
undefined
gridArea
grid-area
undefined
area
grid-area
undefined
gridColumn
grid-column
undefined
gridRow
grid-row
undefined
gridColumnStart
grid-column-start
undefined
gridRowStart
grid-row-start
undefined
gridColumnEnd
grid-column-end
undefined
gridRowEnd
grid-row-end
undefined
flexBasis
flex-basis
undefined
flexShrink
flex-shrink
undefined
flexGrow
flex-grow
undefined
order
order
undefined

Space

Prop
Properties
Scale
m
margin
space
mx
margin-left, margin-right
space
my
margin-top, margin-bottom
space
mt
margin-top
space
mb
margin-bottom
space
mr
margin-right
space
ml
margin-left
space
p
padding
space
px
padding-left, padding-right
space
py
padding-top, padding-bottom
space
pt
padding-top
space
pb
padding-bottom
space
pr
padding-right
space
pl
padding-left
space

Typography

Prop
Properties
Scale
fontFamily
font-family
fonts
fontWeight
font-weight
fontWeights
lineHeight
line-height
lineHeights
fontSize
font-size
fontSizes
letterSpacing
letter-spacing
letterSpacings
textAlign
text-align
undefined
fontStyle
font-style
undefined
textDecoration
text-decoration
undefined
textTransform
text-transform
undefined
whiteSpace
white-space
undefined

Color

Prop
Properties
Scale
color
color
colors
bg
background-color
colors
gradient
background-image
gradients
borderColor
border-color
colors
borderColorX
border-left-color, border-right-color
colors
borderColorY
border-top-color, border-bottom-color
colors
borderColorLeft
border-left-color
colors
borderColorRight
border-right-color
colors
borderColorTop
border-top-color
colors
borderColorBottom
border-bottom-color
colors
fill
fill
colors
stroke
stroke
colors

Border

Prop
Properties
Scale
border
border
borders
borderX
border-left, border-right
borders
borderY
border-top, border-bottom
borders
borderTop
border-top
borders
borderRight
border-right
borders
borderBottom
border-bottom
borders
borderLeft
border-left
borders
borderWidth
border-width
borderWidths
borderWidthX
border-left-width, border-right-width
borderWidths
borderWidthY
border-top-width, border-bottom-width
borderWidths
borderWidthLeft
border-left-width
borderWidths
borderWidthRight
border-right-width
borderWidths
borderWidthTop
border-top-width
borderWidths
borderWidthBottom
border-bottom-width
borderWidths
borderRadius
border-radius
radii
borderRadiusLeft
border-top-left-radius, border-bottom-left-radius
radii
borderRadiusTop
border-top-left-radius, border-top-right-radius
radii
borderRadiusBottom
border-bottom-left-radius, border-bottom-right-radius
radii
borderRadiusRight
border-top-right-radius, border-bottom-right-radius
radii
borderRadiusTopLeft
border-top-left-radius
radii
borderRadiusTopRight
border-top-right-radius
radii
borderRadiusBottomRight
border-bottom-right-radius
radii
borderRadiusBottomLeft
border-bottom-left-radius
radii
borderStyle
border-style
undefined
borderStyleX
border-left-style, border-right-style
undefined
borderStyleY
border-top-style, border-bottom-style
undefined
borderStyleLeft
border-left-style
undefined
borderStyleRight
border-right-style
undefined
borderStyleTop
border-top-style
undefined
borderStyleBottom
border-bottom-style
undefined

Flex

Prop
Properties
Scale
flexDirection
flex-direction
undefined
flexWrap
flex-wrap
undefined
flex
flex
undefined
justifyContent
justify-content
undefined
justifyItems
justify-items
undefined
alignItems
align-items
undefined
alignContent
align-content
undefined
justifySelf
justify-self
undefined
alignSelf
align-self
undefined
gridArea
grid-area
undefined
area
grid-area
undefined
flexBasis
flex-basis
undefined
flexShrink
flex-shrink
undefined
flexGrow
flex-grow
undefined
order
order
undefined
gap
gap
space
rowGap
row-gap
space
columnGap
column-gap
space

Grid

Prop
Properties
Scale
gridAutoColumns
grid-auto-columns
undefined
gridAutoRows
grid-auto-rows
undefined
gridTemplateColumns
grid-template-columns
undefined
gridTemplateRows
grid-template-rows
undefined
gridTemplateAreas
grid-template-areas
undefined
gridAutoFlow
grid-auto-flow
undefined
flow
grid-auto-flow
cols
grid-template-columns
rows
grid-template-rows
autoRows
grid-auto-rows
undefined
autoCols
grid-auto-columns
undefined
alignAll
justify-content, align-items
undefined
justifyContent
justify-content
undefined
justifyItems
justify-items
undefined
alignItems
align-items
undefined
alignContent
align-content
undefined
justifySelf
justify-self
undefined
alignSelf
align-self
undefined
gridArea
grid-area
undefined
area
grid-area
undefined
gridColumn
grid-column
undefined
gridRow
grid-row
undefined
gridColumnStart
grid-column-start
undefined
gridRowStart
grid-row-start
undefined
gridColumnEnd
grid-column-end
undefined
gridRowEnd
grid-row-end
undefined
gap
gap
space
rowGap
row-gap
space
columnGap
column-gap
space

Background

Prop
Properties
Scale
background
background
undefined
backgroundImage
background-image
undefined
backgroundSize
background-size
undefined
backgroundRepeat
background-repeat
undefined
backgroundPosition
background-position
undefined

Positioning

Prop
Properties
Scale
position
position
undefined
inset
top, right, bottom, left
undefined
top
top
undefined
right
right
undefined
bottom
bottom
undefined
left
left
undefined
zIndex
z-index
zIndices
opacity
opacity
opacities

Shadow

Prop
Properties
Scale
boxShadow
box-shadow
shadows
textShadow
text-shadow
shadows

Scales

Scale
Properties
space
gap, row-gap, column-gap, margin, margin-left, margin-right, margin-top, margin-bottom, padding, padding-left, padding-right, padding-top, padding-bottom
fontSizes
font-size
lineHeights
line-height
letterSpacings
letter-spacing
fontWeights
font-weight
fonts
font-family
radii
border-radius, border-top-left-radius, border-bottom-left-radius, border-top-right-radius, border-bottom-right-radius
borders
border, border-left, border-right, border-top, border-bottom
borderWidths
border-width, border-left-width, border-right-width, border-top-width, border-bottom-width
colors
color, background-color, border-color, border-left-color, border-right-color, border-top-color, border-bottom-color, fill, stroke
gradients
background-image
shadows
box-shadow, text-shadow
transitions
transition
animations
animation
zIndices
z-index
opacities
opacity

Transforms

size

The size handles dimensions with a few specific cases to help with common patterns. While string are not transformed - numbers are transformed in the following ways:

  • Percentage: >= -1 and <= 1
  • Pixels: Any number < -1 and > 1

Input:

<Box width={1} /> // 1
<Box width={1 / 5} /> // 2
<Box width={-1 / 2} /> // 3
<Box width={100} /> // 4
<Box width="calc(100% - 2rem)" /> // 5
<Box width="1px" /> // 6

Output:

.Box-1 {
width: 100%;
}
.Box-2 {
width: 20%;
}
.Box-3 {
width: -50%;
}
.Box-4 {
width: 100px;
}
.Box-5 {
width: calc(100% - 2rem);
}
.Box-6 {
width: 1px;
}

grid

Grid ratios can be very verbose and require safeguards to use effectively. For certain grid props we apply the following transforms to reduce boilerplate and decrease side effects:

  • Numbers are treated as the number of fractions available 12 => repeat(12, minmax(0, 1fr)) and apply a minumum of 0 to prevent grid blowout.
  • Grid templates are now expressed like a ratio - replacing spaces with :.
  • Alias grid specific keywords and remove grid specific units and remove ones that are no longer pain points in a shorter syntax:
    • min-content => min
    • max-content => max,
    • 1fr => 1
  • Repeated columns are are repeat(3, 1fr) => 1:1:1.

Standard Grid properties may use the original syntax without applying any transform. Here is an example of the same output expressed in each syntax:

<GridBox autoRows={['20rem' , ,'25rem']} cols={[1, , 'max:1', 3]} />
<GridBox
gridAutoRows={{
_: "minmax(0, 20rem)" ,
sm: "minmax(0, 25rem)",
}}
gridTemplateColumns={{
_: 'minmax(0, 1fr)',
sm 'minmax(0, max-content) minmax(0, 1fr))',
md: 'repeat(3, minmax(0, 1fr)'
}}
>