Flexible Customization Options
Customize and extend Atomix layout components to match your unique requirements. From quick CSS variable tweaks to complete custom implementations, we provide multiple levels of customization.
Runtime theming and quick adjustments without rebuilding
Build-time configuration for deep customization
Dynamic behavior and styling per component instance
Extend and create new layout patterns
Customize the grid system using CSS custom properties. These can be set globally or scoped to specific components.
1:root {
2 /* Container widths */
3 --atomix-container-sm: 540px;
4 --atomix-container-md: 720px;
5 --atomix-container-lg: 960px;
6 --atomix-container-xl: 1140px;
7 --atomix-container-xxl: 1320px;
8
9 /* Container padding */
10 --atomix-container-padding-x: 0.75rem;
11 --atomix-container-padding-x-sm: 1rem;
12 --atomix-container-padding-x-md: 1.5rem;
13
14 /* Grid gutters */
15 --atomix-grid-gutter-width: 1.5rem;
16 --atomix-grid-gutter-width-sm: 1rem;
17 --atomix-grid-gutter-width-lg: 2rem;
18
19 /* Grid columns */
20 --atomix-grid-columns: 12;
21}Customize masonry grid spacing and animations using CSS custom properties.
1:root {
2 /* Masonry gaps */
3 --atomix-masonry-gap: 1rem;
4 --atomix-masonry-gap-sm: 0.75rem;
5 --atomix-masonry-gap-lg: 1.5rem;
6
7 /* Masonry animations */
8 --atomix-masonry-transition: transform 0.3s ease;
9}Override SCSS variables before importing Atomix to customize the entire system at build time. This approach provides maximum performance and allows for complete system customization.
1// Override before importing Atomix
2$grid-columns: 16;
3$grid-gutter-width: 2rem;
4$container-max-widths: (
5 sm: 540px,
6 md: 740px,
7 lg: 980px,
8 xl: 1180px,
9 xxl: 1360px
10);
11
12// Import Atomix with your customizations
13@use 'atomix/styles' as *;Customize container and row components with props for dynamic behavior.
1import { Container, Row, GridCol } from '@shohojdhara/atomix';
2
3<Container
4 fluid={false}
5 maxWidth="lg"
6 className="custom-container"
7>
8 <Row
9 gutter={'lg'}
10 justify="center"
11 align="middle"
12 >
13 <GridCol span={6}>
14 Custom column
15 </GridCol>
16 </Row>
17</Container>GridCol supports responsive breakpoints, offsets, ordering, and alignment.
1import { Row, GridCol } from '@shohojdhara/atomix';
2
3<Row>
4 <GridCol
5 xs={12}
6 sm={6}
7 md={4}
8 lg={3}
9 offset={2}
10 order={1}
11 align="center"
12 >
13 Responsive column with options
14 </GridCol>
15</Row>Create custom layout components by extending Atomix components. This approach allows you to build on top of Atomix while maintaining full control over styling and behavior.
1import styled from 'styled-components';
2import { Container, Row, GridCol } from '@shohojdhara/atomix';
3
4// Extend Container with custom styling
5const CustomLayout = styled(Container)`
6 max-width: 1400px;
7 padding: 0 2rem;
8
9 ${Row} {
10 margin: 0 -1.5rem;
11 }
12
13 ${GridCol} {
14 padding: 0 1.5rem;
15 }
16`;
17
18// Usage
19function MyPage() {
20 return (
21 <CustomLayout>
22 <Row>
23 <GridCol md={6}>Content</GridCol>
24 <GridCol md={6}>Content</GridCol>
25 </Row>
26 </CustomLayout>
27 );
28}Alternatively, use CSS Modules to style Atomix components with custom classes.
1import { Container, Row, GridCol } from '@shohojdhara/atomix';
2import styles from './CustomLayout.module.scss';
3
4function CustomLayout() {
5 return (
6 <Container className={styles.customContainer}>
7 <Row className={styles.customRow}>
8 <GridCol md={6} className={styles.customCol}>
9 Content
10 </GridCol>
11 <GridCol md={6} className={styles.customCol}>
12 Content
13 </GridCol>
14 </Row>
15 </Container>
16 );
17}
18
19// CustomLayout.module.scss
20.customContainer {
21 max-width: 1400px;
22 padding: 0 2rem;
23}
24
25.customRow {
26 margin: 0 -1.5rem;
27}
28
29.customCol {
30 padding: 0 1.5rem;
31}Use CSS custom properties for quick adjustments and runtime theming. They're the easiest way to customize without rebuilding.
When you need to change the entire system (like column count or breakpoints), use SCSS variables at build time.
Use component props when you need different configurations for different instances of the same component.
Create custom components when you need completely new layout patterns or complex styling requirements.