You are currently viewing outdated (<=3.x) Chameleon documentation on our old website. For version >=4.x, check out our new website.

Current release: 3.5.0 | hub

getting-started

Styled system ()

Extend your components with necessary extra styling, while still adhering to Chameleon's foundations.

Flexibility

While we strive to provide you as a developer with a wide range of standalone components, the final end product will always be a collection of pages. These pages consist of patterns, which in turn are built out of our components.

These patterns and pages are compositions, where there is a certain relationship between the components. A spatial relationship needs to be established to result in a user-friendly browsing experience.

This calls for a system that is built upon our design system, that allows all components a certain degree of extensibility. Our implementation is based on styled-system which promises it "lets you quickly build custom UI components with constraint-based style props based on scales defined in your theme".

System props

Our implementation allows you to extend a component's styling with a certain set of properties. These properties are different per component (e.g. we won't allow you to change the padding on a Button, but you can freely alter padding on a Paper).

Every component will display its System Props under its Propstable, so you can quickly check what is allowed and what properties are withheld.

Categories

All system props also fall in certain categories, and whitelisted properties from the same category will always be allowed as a whole.

BackgroundProps

  • bgColor

BorderProps

  • borderBottomColor
  • borderBottomStyle
  • borderBottomWidth
  • borderColor
  • borderLeftColor
  • borderLeftStyle
  • borderLeftWidth
  • borderRightColor
  • borderRightStyle
  • borderRightWidth
  • borderStyle
  • borderTopColor
  • borderTopStyle
  • borderTopWidth
  • borderWidth

BorderRadiusProps

  • borderRadius

ColorProps

  • colorProps

DisplayProps

  • display

FlexProps

  • alignSelf
  • flex
  • flexBasis
  • flexGrow
  • flexShrink
  • order

FlexParentProps

  • alignContent
  • alignItems
  • flexDirection
  • flexWrap
  • justifyContent

FloatProps

  • float

HeightProps

  • height
  • maxHeight

MarginProps

  • m
  • mb
  • ml
  • mr
  • mt
  • mx
  • my

PaddingProps

  • p
  • pb
  • pl
  • pr
  • pt
  • px
  • py

PositioningProps

  • position
  • bottom
  • left
  • right
  • top
  • zIndex

TextProps

  • fontWeight
  • textAlign
  • fontFamily
  • decoration

WidthProps

  • width

© Copyright 2020 Mediahuis NV. All rights Reserved