Back to PrimitivesView on GitHubSection content goes here.
Section
1:1LayoutContent section with optional heading.
Example
Usage
import { Section, Text } from '@/components/polaris';
function Example() {
return (
<Section>
<Text>Section content goes here.</Text>
</Section>
);
}Component Source
import { forwardRef, createElement } from 'react';
import type { JSX } from 'react';
export type SectionProps = JSX.IntrinsicElements['s-section'];
/**
* Section component - groups related content within a page.
*
*
* @example
* <Section heading="Details">
* Content here
* </Section>
*/
export const Section = forwardRef<HTMLElement, SectionProps>(({ children, ...props }, ref) => {
return createElement('s-section', { ref, ...props }, children);
});
Section.displayName = 'Section';