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
Prop | Description | Required |
---|---|---|
children | Any valid JSX element, including SectionHeader and Content | true |
className | classNames for the Section Component | false |
style | CSS Styles | false |
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>