Center

Center centers one child in the available space.
Use it when that is all the layout needs. It delegates to Align, so choosing between the two does not add another alignment mode.
Use it for empty states, spinners, single cards, or onboarding messages. Do not use it when you need multiple children or when you need more explicit positioning behavior.

Example

use fission::prelude::*;

fission_component! {
    pub LoadingPanel<()>
    view(_panel, _state, cx) =>
    Center(Spinner(motion: SpinnerMotion::Default, label: cx.tr("loading.content")))
}

Field table

Field
Type
Meaning
Notes / default behavior
child
Widget
The widget to center in the available space.
Required. Center has no extra alignment fields of its own.

Behavior and advice

Because Center simply builds an Align, it shares the same layout behavior: it fills bounded parent space and centers the child inside that space, while falling back to the child's size on unbounded axes.
Choose Center when you want the most direct way to say "put this in the middle." Choose Container when styling is also part of the job, and choose Row or Column when sibling layout matters.

Production checklist

•
Verify that the parent actually offers the space within which the child should be centred.
•
Test unbounded scroll axes and content wider than the parent.
•
Keep loading announcements or recovery controls in the surrounding flow; positioning a spinner does not supply those semantics.
Previous
AspectRatio
Next
Clip