Skip to content

Responsive & RTL

GolemUI adapts to different screen sizes using two complementary strategies: media queries for global token scaling, and container queries for component-level layout adaptation.

GolemUI defines four breakpoint reference tokens:

TokenValue
--gui-bp-sm640px
--gui-bp-md768px
--gui-bp-lg1024px
--gui-bp-xl1280px

At smaller viewport sizes, spacing and typography tokens automatically scale down to keep the UI compact and readable.

TokenDefaultScaled to
--gui-space-61.5rem (24px)1.25rem (20px)
--gui-space-82rem (32px)1.5rem (24px)
--gui-space-102.5rem (40px)2rem (32px)
TokenDefaultScaled to
--gui-space-41rem (16px)0.75rem (12px)
--gui-space-61.5rem (24px)1rem (16px)
--gui-space-82rem (32px)1.25rem (20px)
--gui-space-102.5rem (40px)1.5rem (24px)
--gui-font-2xl1.5rem (24px)1.25rem (20px)
--gui-font-3xl2rem (32px)1.5rem (24px)

GolemUI forms respond to their container width, not just the viewport. This means a form placed in a narrow sidebar adapts correctly even on a wide screen.

When the form container is 480px or narrower, several components automatically adjust their layout:

ComponentBehavior
Horizontal fieldsSwitch from row to column layout
Flex rowsStack vertically
CalendarsExpand to full container width
Tab buttonsReduce padding and font size

GolemUI supports right-to-left layouts for languages like Arabic, Hebrew, and Persian.

When you set in the localization property a RTL language like Persian or Hebrew, then the form will display automatically as RTL.

i18next.init({
fallbackLng: 'fa',
fa: {
translation: {
rtl: { username: 'نام کاربری', password: 'رمز عبور', },
},
},
});
const localization = { /* i18next implementation */ };
export function FormPage() {
return (
<div>
<React.FormComponent
formDef={formDef}
data={formData}
fieldLoader={widgetLoaders}
localization={localization}
/>
</div>
);
}

Yes, it’s that easy. Nothing else on your side has to be handled.

Check the i18n section for more examples and full implementation details.

All components mirror automatically in RTL mode — no additional CSS needed on your side.

AreaWhat adapts
Text and inputsPadding and alignment flip to match reading direction
Icons and arrowsSelect arrows, date-picker icons, and toggle sliders reposition
ButtonsRepeater action buttons align to the correct side
CalendarMonth navigation arrows mirror direction