UI Components
States


Components styles
UIButton
Type (Optional)



Size (Optional)

UIChip

Last updated







Last updated
import {Component} from "substance"
class MyComponent extends Component {
render($$) {
// Default things
const nodeState = this.props.isolatedNodeState
if (nodeState === 'focused' || nodeState === 'selected') {
// Present this
}
else {
// Do something else
}
}
}$$(UIButton, {
'type': 'primary-small'
})// Primary button
$$(UIButton, {
type: 'primary'
})// Primary outline button
$$(UIButton, {
type: 'outline-primary'
})// Cancel button with
$$(UIButton, {
label: 'Cancel',
type: 'default-outline-secondary'
})
// Primary button
$$(UIButton, {
label: 'Apply',
type: 'primary'
})// Large
$$(UIButton, {
label: 'Large',
size: 'large'
})
// Default
$$(UIButton, {
label: 'Default',
})
// Small
$$(UIButton, {
label: 'Small',
size: 'small'
})$$(UIChip, {
thumbnail: 'nicklas.png',
value: 'Nicklas Janresjö',
type: 'alert'
})