Displays
Display groups render individual form inputs and labels for a model attribute on the show page. They are used in the ModelShowDescription
component.
The complete list of display group components is below.
Layout
The default layout is vertical. The other layouts are horizontal and floating. Individual fields can be configured to use a different layout by explicitly using the ModelDisplayGroup
variant ie <ModelDisplayGroupHorizontal model="blog" path="title"
.
Global horizontal layout
- Global
- Model
- Attribute
const rhinoConfig = {
version: 1,
components: {
ModelDisplayGroup: ModelDisplayGroupHorizontal
}
}
const rhinoConfig = {
version: 1,
components: {
blog: {
ModelDisplayGroup: ModelDisplayGroupHorizontal
}
}
}
const rhinoConfig = {
version: 1,
components: {
blog: {
title: {
ModelDisplayGroup: ModelDisplayGroupHorizontal
}
}
}
}
Global floating layout
- Global
- Model
- Attribute
const rhinoConfig = {
version: 1,
components: {
ModelDisplayGroup: ModelDisplayGroupFloating
}
}
const rhinoConfig = {
version: 1,
components: {
blog: {
ModelDisplayGroup: ModelDisplayGroupFloating
}
}
}
const rhinoConfig = {
version: 1,
components: {
blog: {
title: {
ModelDisplayGroup: ModelDisplayGroupFloating
}
}
}
}
Display behaviour
Change label
- Global
- Model
- Attribute
const rhinoConfig = {
version: 1,
components: {
ModelDisplayGroup: { props: { label: 'Awesome Title!' } }
}
}
const rhinoConfig = {
version: 1,
components: {
blog: {
ModelDisplayGroup: { props: { label: 'Awesome Title!' } }
}
}
}
const rhinoConfig = {
version: 1,
components: {
blog: {
title: {
ModelDisplayGroup: { props: { label: 'Awesome Title!' } }
}
}
}
}
Change enpty placeholder
- Global
- Model
- Attribute
const rhinoConfig = {
version: 1,
components: {
ModelDisplayGroup: { props: { empty: '/' } }
}
}
const rhinoConfig = {
version: 1,
components: {
blog: {
ModelDisplayGroup: { props: { empty: '/' } }
}
}
}
const rhinoConfig = {
version: 1,
components: {
blog: {
title: {
ModelDisplayGroup: { props: { empty: '/' } }
}
}
}
}