NUI / Components / Common

Divider

ImplementedCommon / Display

Divider renders a thin separator line using explicit width, height, and color.

Supported as a simple separator.

Overview

Divider renders a thin separator line using explicit width, height, and color.

When to use

  • Use Divider to separate groups in panels, menus, forms, and list sections.

Children

Does not support children.

Basic syntax

nui
Divider SectionDivider {
    width: 240
    height: 1
    color: "#334155"
}

Supported properties

PropertyTypeRequiredDefaultDescription
colorcolorNoDefaultDivider color.
backgroundColorcolorNoDefaultDivider color alias used by visual components.
widthnumberNoAutoDesired width.
heightnumberNoAutoDesired height.
minWidthnumberNoUnsetMinimum width.
minHeightnumberNoUnsetMinimum height.
opacitynumberNo1Render opacity.
layerintegerNoContext defaultLayer order inside layered parents.
visibleboolNotrueVisibility flag.

Contextual properties

Contextual property rules

Divider may receive stack, canvas, grid, wrap, or ExpandableArea slot properties only when it is authored as a direct child of the matching parent. See section 7.

Full syntax example

nui
Divider SectionDivider {
    color: "#334155"
    width: 240
    height: 1
    minWidth: 80
    minHeight: 1
    opacity: 0.75
    layer: 1
    visible: true
}

Limitations

  • Divider does not currently expose an orientation property. Set width and height to create horizontal or vertical separators.