States

API

  • An object of key/value pairs where each key represents an individual boolean prop (instead of options of a single prop) that can be simultaneously configured. This makes enabling / disabling specific behaviors as needed far easier as they do not need to be reduced to a single mutually exclusive set of states.
import { animus } from '@animus-ui/core';
const FlexBox = animus
.states({
fit: {
width: 1,
height: 1,
},
center: {
alignItems: 'center',
justifyContent: 'center',
},
}).asElement('div')
<FlexBox fit center />;