Collapsible¶
Collapsible has a title row that shows and hides its content when pressed. The arrow turns and the content fades in.
Usage¶
Call Components.Collapsible with a scope and a table of properties:
C.Collapsible(scope, {
Title = "Advanced",
Open = false,
Children = {
C.Switch(scope, { Label = "Debug mode" }),
},
})
Properties¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Theme |
ThemeRef |
The contextual theme | Theme to use for this component instead of the one from Theme.Provide. |
|
LayoutOrder |
UsedAs<number> |
0 |
Position in a parent UIListLayout or UIGridLayout. |
|
Size |
UsedAs<UDim2> |
- | Size of the component. | |
Visible |
UsedAs<boolean> |
true |
Whether the component is shown. | |
ZIndex |
UsedAs<number> |
- | Z index of the component. | |
Title |
UsedAs<string> |
- | Text of the title row. | |
Open |
UsedAs<boolean> |
false |
Whether the content is shown. A plain value is only the starting state. A Value is followed, and is set when the user opens or closes it. |
|
Children |
any |
- | The content that is shown and hidden. | |
Id |
string |
- | Key that identifies this component when state is kept across rebuilds. See Persist. |
Callbacks¶
| Name | Description |
|---|---|
OnChanged: (boolean) -> () |
Runs with the new state when the user opens or closes it. |