Provides timings and easings aliases to use with animations in an application
Aliases that are related to border styling. Can provide width, radius and other useful aliases
A large set of aliased colours. Follow the Material Design colour names.
Aliases that are related to font styling. Can provide sizing, spacing and other useful aliases
Opacity aliases that can be used to specify the transparency of objects.
Timings can be used to provide a consistent feel for durations in an application. They are usually used for delays to provide a consistent feel.
The constants interface provides primitive values for various styling aliases. They can be used as default values for static styles
import { constants } from '@ef-carbon/react-native-style';
export default StyleSheet.create({ container: { // Spacing margin: constants.spacing.normal, padding: constants.padding.normal,
// Borders borderRadius: constants.border.radius.normal, borderWidth: constants.border.width.normal, // Colours borderColor: constants.colour.grey.darker, backgroundColor: constants.colour.grey.lightest,
}, text: { // Fonts fontSize: constants.font.size.normal, lineHeight: constants.font.lineHeight.normal, }, });
`