All @deity/falcon-ui components accept responsive, theme-based style props which offer easy to use, flexible yet consistent styling customization.
Responsive, theme-based style props can be used inline on component:
or defined in theme:
All of @deity/falcon-ui components come with default theme which can be overridden as shown in the example above.
All of the responsive theme-based props work seamlessy with breakpoints defined in Theme.
Simply pass object as responsive prop value with its keys being breakpoints keys defined in Theme and values being property values to have responsive prop that changes based on
screen width.
Breakpoint values defined in Theme get replaced with @media screen and (min-width :...) media query.
All @deity/falcon-ui components include css prop as an escape hatch for more complex and one-off styles.
Css prop accepts CSS properties as an object literal or function with props param that has theme and returns CSS properties as an object literal.
| Property | Meaning(CSS property) | Available Values |
|---|---|---|
| color | color | |
| bg | background-color | |
| fill | fill | |
| stroke | stroke | |
| borderColor | border-color | |
| bgFullWidth | transform function |
The margin and padding props use a shorthand syntax, similar to Tachyons, Basscss or Rebass approaches.
| Property | Meaning(CSS property) | Available Values |
|---|---|---|
| m | margin | |
| mt | margin-top | |
| ml | margin-left | |
| mr | margin-right | |
| mb | margin-bottom | |
| mx | transform function | |
| my | transform function | |
| p | padding | |
| pt | padding-top | |
| pl | padding-left | |
| pr | padding-right | |
| pb | padding-bottom | |
| px | transform function | |
| py | transform function | |
| height | height | |
| width | width | |
| size | transform function | |
| gridGap | grid-gap | |
| gridRowGap | grid-row-gap | |
| gridColumnGap | grid-column-gap |
| Property | Meaning(CSS property) | Available Values |
|---|---|---|
| fontFamily | font-family | |
| fontSize | font-size | |
| fontWeight | font-weight | |
| letterSpacing | letter-spacing | |
| lineHeight | line-height |
| Property | Meaning(CSS property) | Available Values |
|---|---|---|
| border | border | |
| borderTop | border-top | |
| borderRight | border-right | |
| borderBottom | border-bottom | |
| borderLeft | border-left | |
| borderRadius | border-radius |
| Property | Meaning(CSS property) | Available Values |
|---|---|---|
| boxShadow | box-shadow | |
| transitionTimingFunction | transition-timing-function | |
| transitionDuration | transition-duration |