Anatomy
Section

Section

A section of the page or article. Each Section is an Item in the Index. Section uses a SectionContext to wrap the SectionHeader and Content.

When an index item is clicked, the corresponding section scrolls into view.

Props

PropDescriptionRequired
childrenAny valid JSX element, including SectionHeader and Contenttrue
classNameclassNames for the Section Componentfalse
styleCSS Stylesfalse

Sample Usage

<Suchi.Root accentColor="orangered" className="article_wrapper my-8" style={{ padding: "16px"}}>
  <Suchi.Index />
  <Suchi.Header className="my-4 text-3xl font-bold">Building a NPM Libray</Suchi.Header>
 
  <Suchi.Section className="my-4">
    <Suchi.SectionHeader/>
    <Suchi.Content>
      <Suchi.Reference/>
    </Suchi.Content>
  <Suchi.Section>
</Suchi.Root>