# Section

Section wrapper with optional title.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).



<ComponentPreview base="takumi" name="section" />

## Installation [#installation]

<CodeTabs>
  <TabsList>
    <TabsTrigger value="cli">
      Command
    </TabsTrigger>

    <TabsTrigger value="manual">
      Manual
    </TabsTrigger>
  </TabsList>

  <TabsContent value="cli">
    ```bash
    npx shadcn@latest add @pdfcn/takumi/section
    ```
  </TabsContent>

  <TabsContent value="manual">
    <Steps>
      <Step>
        Install the following dependencies:
      </Step>

      ```bash
      npm install takumi-pdf @takumi-rs/helpers
      ```

      <Step>
        Copy and paste the following code into your project.
      </Step>

      <ComponentSource src="registry/bases/takumi/components/section/section.tsx" base="takumi" title="components/pdf/section/section.tsx" />

      <ComponentSource src="registry/bases/takumi/components/theme-provider.tsx" base="takumi" title="components/pdf/theme-provider.tsx" />

      <ComponentSource src="registry/bases/takumi/lib/resolve-color.ts" base="takumi" title="lib/resolve-color.ts" />

      <ComponentSource src="registry/bases/takumi/lib/pdf-primitives.tsx" base="takumi" title="lib/pdf-primitives.tsx" />

      <ComponentSource src="registry/bases/takumi/lib/pdf-svg.tsx" base="takumi" title="lib/pdf-svg.tsx" />

      <ComponentSource src="registry/themes/professional.ts" base="takumi" title="lib/pdf-themes/professional.ts" />

      <ComponentSource src="registry/themes/primitives.ts" base="takumi" title="lib/pdf-themes/primitives.ts" />

      <ComponentSource src="registry/types/pdf-themes.ts" base="takumi" title="types/pdf-themes.ts" />

      <ComponentSource src="registry/types/pdf-components.ts" base="takumi" title="types/pdf-components.ts" />

      <Step>
        Update the import paths to match your project setup.
      </Step>
    </Steps>
  </TabsContent>
</CodeTabs>

## Usage [#usage]

```tsx
import { Section } from "@/components/pdf/section";
import { Text } from "@/components/pdf/text";
```

```tsx
<Section>
  <Text>Section body</Text>
</Section>
```

## API Reference [#api-reference]

### Section [#section]

| Prop          | Type                                              | Default     |
| ------------- | ------------------------------------------------- | ----------- |
| `spacing`     | `'none' \| 'sm' \| 'md' \| 'lg' \| 'xl'`          | `'md'`      |
| `padding`     | `'none' \| 'sm' \| 'md' \| 'lg'`                  | -           |
| `background`  | `string`                                          | -           |
| `border`      | `boolean`                                         | `false`     |
| `variant`     | `'default' \| 'callout' \| 'highlight' \| 'card'` | `'default'` |
| `accentColor` | `string`                                          | -           |
| `noWrap`      | `boolean`                                         | `false`     |
