> To build a Wix site agentically, or add Wix features like bookings or a store to a site you already have, follow https://www.wix.com/headless/skill.md
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: SidePanel Component

## Article: SidePanel Component

## Article Link: https://dev.wix.com/docs/wix-design-system/components/overlays/side-panel-component.md

## Article Content:

# SidePanel

_Components/Overlays_

Interactive docs page: <https://wix-pages.com/design-system-documentation/#/component/sidepanel>

## Overview

```jsx
() => {
  const [color, setColor] = React.useState('#000000');
  const [alignment, setAlignment] = React.useState(0);
  const [text, setText] = React.useState('Luna Boutique');

  return (
    <Box align="center">
      <SidePanel onCloseButtonClick={() => {}}>
        <SidePanel.Header title="Customize text"></SidePanel.Header>
        <SidePanel.Content>
          <StorybookComponents.Stack height="480px" />
        </SidePanel.Content>
        <SidePanel.Footer>
          <Box align="right" gap="12px">
            <Button size="small" priority="secondary">
              Cancel
            </Button>
            <Button size="small">Save</Button>
          </Box>
        </SidePanel.Footer>
      </SidePanel>
    </Box>
  );
};
```

Side panel is a component that presents supplementary information, navigation options, or controls alongside or overlaying the main content of the page.

### Do

- Display supplementary actions or settings that affect the main page content, such as data filters.
- Display tools that can be used on the page.
- Provide more details in context.
- Let users interact with the main page while the side panel is open.

### Don't

- Don't display content while blocking interactions on the main page. Use `<Modal/>` instead.

### Feature examples

#### Structure

Side panels are composed of up to four compound components:

- `<SidePanel.Header/>`
- `<SidePanel.Content/>`
- `<SidePanel.Divider/>`
- `<SidePanel.Footer/>`

All of these components are optional.

```jsx
<SidePanel onCloseButtonClick={() => {}}>
  <SidePanel.Header title="Header" />
  <SidePanel.Content>
    <StorybookComponents.Placeholder height="480px">
      Content
    </StorybookComponents.Placeholder>
  </SidePanel.Content>
  <SidePanel.Footer>
    <StorybookComponents.Placeholder height="36px">
      Footer
    </StorybookComponents.Placeholder>
  </SidePanel.Footer>
</SidePanel>;
```

#### Skin

Control the component style with `skin` prop:

- `standard` is the default style used in all common cases.
- `floating` is used for settings panels that float on top of content in editor platforms ([Wix](https://www.wix.com/) or [Wix Studio](https://www.wix.com/studio)).

```jsx
<StorybookComponents.Stack>
  <SidePanel onCloseButtonClick={() => {}}>
    <SidePanel.Header title="Standard" />
    <SidePanel.Content>
      <StorybookComponents.Stack height="480px" />
    </SidePanel.Content>
  </SidePanel>
  <SidePanel onCloseButtonClick={() => {}} skin="floating" width="288px">
    <SidePanel.Header title="Floating" />
    <SidePanel.Content>
      <StorybookComponents.Stack height="492px" />
    </SidePanel.Content>
  </SidePanel>
</StorybookComponents.Stack>;
```

#### Width

Set the side panel's width using the `width` property. The default width is 420px.

```jsx
<StorybookComponents.Stack>
  <SidePanel onCloseButtonClick={() => {}} width="300px">
    <SidePanel.Header title="Narrow panel" />
    <SidePanel.Content>
      <StorybookComponents.Stack height="360px" />
    </SidePanel.Content>
  </SidePanel>
  <SidePanel onCloseButtonClick={() => {}} width="600px">
    <SidePanel.Header title="Wide panel" />
    <SidePanel.Content>
      <StorybookComponents.Stack height="360px" />
    </SidePanel.Content>
  </SidePanel>
</StorybookComponents.Stack>;
```

#### Height

By default, panel height depends on the amount of content it contains. To define the maximum height it can grow to use `maxHeight` property.

Fix the panel height to a specific number with `height` property.

```jsx
<StorybookComponents.Stack>
  <SidePanel onCloseButtonClick={() => {}} maxHeight="480px">
    <SidePanel.Header title="No height set" />
    <SidePanel.Content>
      <StorybookComponents.Placeholder height="40px" />
    </SidePanel.Content>
  </SidePanel>
  <SidePanel onCloseButtonClick={() => {}} height="480px">
    <SidePanel.Header title="Fixed height set" />
    <SidePanel.Content>
      <StorybookComponents.Placeholder height="40px" />
    </SidePanel.Content>
  </SidePanel>
</StorybookComponents.Stack>;
```

#### Padding

Content padding is enabled in the side panel by default, but can be disabled with the `noPadding` property for:

- `<SidePanel.Header/>`
- `<SidePanel.Content/>`
- `<SidePanel.Footer/>`

The padding can be removed to display lists or other components with built-in padding.

```jsx
<StorybookComponents.Stack>
  <SidePanel onCloseButtonClick={() => {}}>
    <SidePanel.Header title="With padding" />
    <SidePanel.Content>
      <StorybookComponents.Placeholder height="360px" />
    </SidePanel.Content>
    <SidePanel.Footer>
      <StorybookComponents.Placeholder height="42px" />
    </SidePanel.Footer>
  </SidePanel>
  <SidePanel onCloseButtonClick={() => {}}>
    <SidePanel.Header title="No padding" noPadding={true} />
    <SidePanel.Content noPadding={true}>
      <StorybookComponents.Placeholder height="360px" />
    </SidePanel.Content>
    <SidePanel.Footer noPadding={true}>
      <StorybookComponents.Placeholder height="42px" />
    </SidePanel.Footer>
  </SidePanel>
</StorybookComponents.Stack>;
```

#### Dividers

Dividers are enabled in the side panel by default but can be disabled using the `showDivider` property for:

- `<SidePanel.Header/>`
- `<SidePanel.Footer/>`

Always show dividers in the side panel if users have the option to scroll vertically inside the panel.

```jsx
<StorybookComponents.Stack>
  <SidePanel onCloseButtonClick={() => {}}>
    <SidePanel.Header title="With divider" />
    <SidePanel.Content>
      <StorybookComponents.Stack height="360px" />
    </SidePanel.Content>
    <SidePanel.Footer>
      <StorybookComponents.Stack height="42px" />
    </SidePanel.Footer>
  </SidePanel>
  <SidePanel onCloseButtonClick={() => {}}>
    <SidePanel.Header title="No divider" showDivider={false} />
    <SidePanel.Content>
      <StorybookComponents.Stack height="360px" />
    </SidePanel.Content>
    <SidePanel.Footer showDivider={false}>
      <StorybookComponents.Stack height="42px" />
    </SidePanel.Footer>
  </SidePanel>
</StorybookComponents.Stack>;
```

#### Header

Customize the side panel's header using these properties:

- `title`
- `subtitle`

```jsx
<StorybookComponents.Stack flexDirection="column">
  <SidePanel onCloseButtonClick={() => {}}>
    <SidePanel.Header title="Title" showDivider={true} />
  </SidePanel>
  <SidePanel onCloseButtonClick={() => {}}>
    <SidePanel.Header title="Title" subtitle="Subtitle" showDivider={true} />
  </SidePanel>
</StorybookComponents.Stack>;
```

#### Header Actions

Header has these properties for actions available:

- `infoTooltipContent` - provides additional details or an explanation in a tooltip
- `onHelpButtonClick`- allows users to access help articles and contextual information
- `onBackButtonClick`- allows users to navigate back in the Side Panel
- `backButtonDescription` - sets content of the back button's tooltip

```jsx
<StorybookComponents.Stack flexDirection="column">
  <SidePanel onCloseButtonClick={() => {}}>
    <SidePanel.Header
      title="Title"
      subtitle="Subtitle"
      infoTooltipContent="Additional info here"
      showDivider={true}
    />
  </SidePanel>
  <SidePanel onCloseButtonClick={() => {}} onHelpButtonClick={() => {}}>
    <SidePanel.Header title="Title" subtitle="Subtitle" showDivider={true} />
  </SidePanel>
  <SidePanel
    onCloseButtonClick={() => {}}
    onBackButtonClick={() => {}}
    backButtonDescription="Back"
  >
    <SidePanel.Header title="Title" subtitle="Subtitle" showDivider={true} />
  </SidePanel>
</StorybookComponents.Stack>;
```

#### Custom header

Create a custom header layout by adding children elements to the `<SidePanel.Header/>` container.

```jsx
<StorybookComponents.Stack flexDirection="column">
  <SidePanel onCloseButtonClick={() => {}}>
    <SidePanel.Header title="Title">
      <StorybookComponents.Stack margin="0px 24px 12px 24px">
        <StorybookComponents.Placeholder height="42px" />
      </StorybookComponents.Stack>
    </SidePanel.Header>
  </SidePanel>
  <SidePanel onCloseButtonClick={() => {}}>
    <SidePanel.Header title="Title" showDivider={false}>
      <Tabs
        items={[
          { id: 1, title: 'First Tab' },
          { id: 2, title: 'Second Tab' },
        ]}
        activeId={1}
        type="uniformSide"
        width="174px"
      />
    </SidePanel.Header>
  </SidePanel>
  <SidePanel onCloseButtonClick={() => {}}>
    <SidePanel.Header title="Title">
      <StorybookComponents.Stack margin="0px 24px 12px 24px">
        <Search />
      </StorybookComponents.Stack>
    </SidePanel.Header>
  </SidePanel>
</StorybookComponents.Stack>;
```

#### Text overflow

Panel title and subtitle wraps to multiple lines by default. Limit the amount of lines using `ellipsis` and `maxLines` properties.

Ellipsis do not apply to the subtitle, as its main purpose is to provide more information.

```jsx
<StorybookComponents.Stack flexDirection="column">
  <SidePanel onCloseButtonClick={() => {}}>
    <SidePanel.Header
      title="A long title that needs to wrap into multiple lines"
      subtitle="A long subtitle that needs to wrap into multiple lines because it is so long."
      showDivider={true}
    />
  </SidePanel>
  <SidePanel onCloseButtonClick={() => {}}>
    <SidePanel.Header
      ellipsis
      maxLines={1}
      title="A long title that needs to wrap into multiple lines"
      subtitle="A long subtitle that needs to wrap into multiple lines because it is so long."
      showDivider={true}
    />
  </SidePanel>
</StorybookComponents.Stack>;
```

#### Content sections

Create sections inside of a panel by adding multiple `<SidePanel.Content/>` areas.

Separate them from one another with a dedicated `<SidePanel.Divider/>` element.

```jsx
<SidePanel onCloseButtonClick={() => {}}>
  <SidePanel.Header title="Content sections" />
  <SidePanel.Content>
    <StorybookComponents.Stack height="150px" />
  </SidePanel.Content>
  <SidePanel.Divider />
  <SidePanel.Content>
    <StorybookComponents.Stack height="150px" />
  </SidePanel.Content>
  <SidePanel.Divider />
  <SidePanel.Content>
    <StorybookComponents.Stack height="150px" />
  </SidePanel.Content>
</SidePanel>;
```

#### Content fields

Separate controls inside of a panel from one another by wrapping each one into `<SidePanel.Field/>` container.

```jsx
<StorybookComponents.Stack>
  <SidePanel onCloseButtonClick={() => {}}>
    <SidePanel.Header title="Content fields" />
    <SidePanel.Field>
      <StorybookComponents.Placeholder height="48px" />
    </SidePanel.Field>
    <SidePanel.Field>
      <StorybookComponents.Placeholder height="48px" />
    </SidePanel.Field>
    <SidePanel.Field>
      <StorybookComponents.Placeholder height="48px" />
    </SidePanel.Field>
    <SidePanel.Field>
      <StorybookComponents.Placeholder height="48px" />
    </SidePanel.Field>
    <SidePanel.Field>
      <StorybookComponents.Placeholder height="48px" />
    </SidePanel.Field>
    <SidePanel.Field>
      <StorybookComponents.Placeholder height="48px" />
    </SidePanel.Field>
    <SidePanel.Field>
      <StorybookComponents.Placeholder height="48px" />
    </SidePanel.Field>
  </SidePanel>
  <SidePanel onCloseButtonClick={() => {}} skin="floating" width="288px">
    <SidePanel.Header title="Content fields" />
    <SidePanel.Field>
      <StorybookComponents.Placeholder height="48px" />
    </SidePanel.Field>
    <SidePanel.Field>
      <StorybookComponents.Placeholder height="48px" />
    </SidePanel.Field>
    <SidePanel.Field>
      <StorybookComponents.Placeholder height="48px" />
    </SidePanel.Field>
    <SidePanel.Field>
      <StorybookComponents.Placeholder height="48px" />
    </SidePanel.Field>
    <SidePanel.Field>
      <StorybookComponents.Placeholder height="48px" />
    </SidePanel.Field>
    <SidePanel.Field>
      <StorybookComponents.Placeholder height="48px" />
    </SidePanel.Field>
    <SidePanel.Field>
      <StorybookComponents.Placeholder height="48px" />
    </SidePanel.Field>
  </SidePanel>
</StorybookComponents.Stack>;
```

#### Custom footer

To display confirmation or close actions use the `<SidePanel.Footer/>` container.

```jsx
<StorybookComponents.Stack flexDirection="column">
  <SidePanel>
    <SidePanel.Footer>
      <StorybookComponents.Placeholder height="36px" />
    </SidePanel.Footer>
  </SidePanel>
  <SidePanel>
    <SidePanel.Footer>
      <Button priority="secondary" fullWidth>
        Close
      </Button>
    </SidePanel.Footer>
  </SidePanel>
  <SidePanel>
    <SidePanel.Footer>
      <StorybookComponents.Stack justifyContent="flex-end" gap="12px">
        <Button priority="secondary">Cancel</Button>
        <Button>Save</Button>
      </StorybookComponents.Stack>
    </SidePanel.Footer>
  </SidePanel>
</StorybookComponents.Stack>;
```

#### Draggable

Let users know that panel position on the screen can be changed by changing the mouse cursor to grab with `draggable` property.

The behaviour itself has to be developed separately.

```jsx
<SidePanel
  onCloseButtonClick={() => {}}
  skin="floating"
  width="288px"
  draggable
>
  <SidePanel.Header title="Draggable panel" />
  <SidePanel.Content>
    <StorybookComponents.Stack height="492px" />
  </SidePanel.Content>
</SidePanel>;
```

### Mobile examples

#### Mobile usage

Keep `<SidePanel/>` as the layout of the panel and change only its container per screen. On desktop the panel slides in over the page from an absolutely positioned wrapper, as in the common use cases above. On mobile the same panel renders inside a bottom `<Drawer/>` that is non-modal and has no backdrop, so the page behind it stays visible and usable while users adjust settings. The panel takes the height of its content, capped by `maxHeight`, so the footer actions are always in view and longer content scrolls inside `<SidePanel.Content/>`.

Set `dismissible` and `resizable` to `false` so a tap on the page does not close the panel and there is no drag handle. Closing goes through the panel's close button and footer actions on both screens.

_To see the change, toggle 'Enable mobile support' in the top bar of Storybook._

```jsx
() => {
  const { mobile } = React.useContext(WixDesignSystemContext);
  const [isOpen, setIsOpen] = React.useState(false);
  const [text, setText] = React.useState('Luna Boutique');
  const [alignment, setAlignment] = React.useState(1);
  const [bold, setBold] = React.useState(true);

  const alignments = [
    { id: 0, value: 'Left' },
    { id: 1, value: 'Center' },
    { id: 2, value: 'Right' },
  ];

  const close = () => setIsOpen(false);

  const panel = (
    <SidePanel
      width={mobile ? '100%' : '420px'}
      height={mobile ? 'auto' : '100%'}
      maxHeight={mobile ? '75dvh' : undefined}
      closeButtonProps={{ onClick: close }}
    >
      <SidePanel.Header title="Customize text" />
      <SidePanel.Content>
        <Box direction="vertical" gap="SP4">
          <FormField label="Text">
            <Input value={text} onChange={(e) => setText(e.target.value)} />
          </FormField>
          <FormField label="Alignment">
            <Dropdown
              selectedId={alignment}
              options={alignments}
              onSelect={(option) => setAlignment(Number(option.id))}
            />
          </FormField>
          <FormField label="Bold" labelPlacement="left">
            <ToggleSwitch checked={bold} onChange={() => setBold(!bold)} />
          </FormField>
        </Box>
      </SidePanel.Content>
      <SidePanel.Footer>
        <Box align="right" gap="12px">
          <Button size="small" priority="secondary" onClick={close}>
            Cancel
          </Button>
          <Button size="small" onClick={close}>
            Save
          </Button>
        </Box>
      </SidePanel.Footer>
    </SidePanel>
  );

  return (
    <div style={{ position: 'relative', overflow: 'hidden', height: '480px' }}>
      <Box direction="vertical" gap="SP4" padding="SP4">
        <Box>
          <Button
            size="small"
            priority="secondary"
            onClick={() => setIsOpen(true)}
          >
            Customize text
          </Button>
        </Box>
        <Box
          align={
            alignments[alignment].value.toLowerCase() as
              | 'left'
              | 'center'
              | 'right'
          }
          padding="SP6"
          backgroundColor="D70"
          borderRadius="8px"
        >
          <Text size="medium" weight={bold ? 'bold' : 'normal'}>
            {text}
          </Text>
        </Box>
      </Box>

      {mobile ? (
        <Drawer
          open={isOpen}
          onClose={close}
          modal={false}
          dismissible={false}
          resizable={false}
          renderBackdrop={false}
          margin={false}
          scrollable={false}
        >
          {panel}
        </Drawer>
      ) : (
        <div
          style={{
            position: 'absolute',
            top: 0,
            right: isOpen ? 0 : '-440px',
            height: '100%',
            boxShadow:
              '0 3px 24px 0 rgba(22, 45, 61, 0.18), 0 8px 8px 0 rgba(22, 45, 61, 0.12)',
            transition: 'right 0.4s ease 0s',
            zIndex: 1000,
          }}
        >
          {panel}
        </div>
      )}
    </div>
  );
};
```

### Common use case examples

#### Settings panel

Use side panel to create settings panels that allow users to control the design and behavior aspects of their app.

```jsx
<SidePanel onCloseButtonClick={() => {}} skin="floating" width="288px">
  <SidePanel.Header title="Button Settings" />
  <SidePanel.Field>
    <FormField label="Choose what displays">
      <Dropdown
        size="small"
        selectedId={0}
        options={[
          { id: 0, value: 'Text and icon' },
          { id: 1, value: 'Icon only' },
          { id: 2, value: 'Text only' },
          { id: 3, value: 'Nothing' },
        ]}
      />
    </FormField>
  </SidePanel.Field>
  <SidePanel.Field>
    <FormField label="Text">
      <Input size="small" value="New Folder" />
    </FormField>
  </SidePanel.Field>
  <SidePanel.Field>
    <FieldSet
      legend="Icon"
      columns="auto 30px 30px"
      gap="small"
      alignment="center"
    >
      <ImageViewer height="102px" width="160px" />
      <IconButton size="small" priority="secondary">
        <Icons.ReplaceSmall />
      </IconButton>
      <IconButton size="small" priority="secondary">
        <Icons.DeleteSmall />
      </IconButton>
    </FieldSet>
  </SidePanel.Field>
  <SidePanel.Field>
    <FormField label="Links to">
      <Button
        size="small"
        priority="secondary"
        fullWidth
        suffixIcon={<Icons.LinkSmall />}
      >
        Choose a link
      </Button>
    </FormField>
  </SidePanel.Field>
</SidePanel>;
```

#### Group content in settings panels

Use `<SidePanel.Section/>` wrapper to organize panel info into categories.

It will make the whole panel easier to scan.

```jsx
() => {
  const [selectedOption, setSelectedOption] = React.useState(0);
  const options = [
    { id: 0, value: 'Monday' },
    { id: 1, value: 'Sunday' },
  ];
  return (
    <SidePanel
      maxHeight="576px"
      width="288px"
      skin="floating"
      onCloseButtonClick={() => {}}
    >
      <SidePanel.Header title="Calendar Settings" />
      <SidePanel.Content noPadding>
        <SidePanel.Field>
          <FormField label="Week starts on">
            <Dropdown
              value=""
              size="small"
              options={options}
              onSelect={(option) => setSelectedOption(Number(option.id))}
              selectedId={selectedOption}
            />
          </FormField>
        </SidePanel.Field>
        <SidePanel.Field>
          <FieldSet
            legend="Set active days"
            legendSize="small"
            legendPlacement="top"
            direction="vertical"
            gap="medium"
          >
            <Checkbox size="small" checked>
              Monday
            </Checkbox>
            <Checkbox size="small" checked>
              Tuesday
            </Checkbox>
            <Checkbox size="small" checked>
              Wednesday
            </Checkbox>
            <Checkbox size="small" checked>
              Thursday
            </Checkbox>
            <Checkbox size="small" checked>
              Friday
            </Checkbox>
            <Checkbox size="small">Saturday</Checkbox>
            <Checkbox size="small">Sunday</Checkbox>
          </FieldSet>
        </SidePanel.Field>
        <SidePanel.Section title="Available dates">
          <SidePanel.Field>
            <FieldSet
              legend="Available dates"
              alignment="end"
              direction="horizontal"
              legendPlacement="none"
            >
              <FormField label="From">
                <DatePicker
                  size="small"
                  width="auto"
                  onChange={() => {}}
                  placeholderText="Start"
                  popoverProps={{ appendTo: 'window' }}
                />
              </FormField>
              <FormField label="To">
                <DatePicker
                  size="small"
                  width="auto"
                  onChange={() => {}}
                  placeholderText="End"
                  popoverProps={{ appendTo: 'window' }}
                />
              </FormField>
              <Tooltip content="Delete">
                <IconButton size="small" priority="secondary">
                  <Icons.DeleteSmall />
                </IconButton>
              </Tooltip>
            </FieldSet>
          </SidePanel.Field>
          <SidePanel.Field>
            <TextButton size="small" prefixIcon={<Icons.AddSmall />}>
              Add Available Dates
            </TextButton>
          </SidePanel.Field>
        </SidePanel.Section>
        <SidePanel.Section title="Unavailable dates">
          <SidePanel.Field>
            <FieldSet
              legend="Unavailable dates"
              alignment="end"
              direction="horizontal"
              legendPlacement="none"
            >
              <FormField label="From">
                <DatePicker
                  size="small"
                  width="auto"
                  onChange={() => {}}
                  placeholderText="Start"
                  popoverProps={{ appendTo: 'window' }}
                />
              </FormField>
              <FormField label="To">
                <DatePicker
                  size="small"
                  width="auto"
                  onChange={() => {}}
                  placeholderText="End"
                  popoverProps={{ appendTo: 'window' }}
                />
              </FormField>
              <Tooltip content="Delete">
                <IconButton size="small" priority="secondary">
                  <Icons.DeleteSmall />
                </IconButton>
              </Tooltip>
            </FieldSet>
          </SidePanel.Field>
          <SidePanel.Field>
            <TextButton size="small" prefixIcon={<Icons.AddSmall />}>
              Add Unavailable Dates
            </TextButton>
          </SidePanel.Field>
        </SidePanel.Section>
      </SidePanel.Content>
    </SidePanel>
  );
};
```

#### Data filter

Use side panels to display data filters. When opened, the panels should slide in from the right side of the screen. Add close buttons in the header and/or footer that can be used to close the panel.

```jsx
() => {
  const [right, setRight] = React.useState(-440);
  const [records, setRecords] = React.useState([
    {
      image: <Image width="42px" height="42px" />,
    },
    {
      image: <Image width="42px" height="42px" />,
    },
    {
      image: <Image width="42px" height="42px" />,
    },
    {
      image: <Image width="42px" height="42px" />,
    },
    {
      image: <Image width="42px" height="42px" />,
    },
    {
      image: <Image width="42px" height="42px" />,
    },
    {
      image: <Image width="42px" height="42px" />,
    },
  ]);

  const columns = [
    {
      title: '',
      render: (row) => row.image,
    },
  ];

  const openPanel = () => {
    setRight(0);
  };

  const closePanel = () => {
    setRight(-440);
  };

  return (
    <div style={{ display: 'block', overflow: 'hidden', position: 'relative' }}>
      <Page height="780px" maxWidth={500}>
        <Page.Header title="Products" />
        <Page.Content>
          <Card>
            <Table data={records} columns={columns} rowVerticalPadding="tiny">
              <TableToolbar>
                <TableToolbar.ItemGroup position="start">
                  <TableToolbar.Item>
                    <TableToolbar.Label>7 products</TableToolbar.Label>
                  </TableToolbar.Item>
                </TableToolbar.ItemGroup>
                <TableToolbar.ItemGroup position="end">
                  <TableToolbar.Item>
                    <Button
                      size="small"
                      priority="secondary"
                      prefixIcon={<Icons.ContentFilterSmall />}
                      onClick={openPanel}
                    >
                      Filter
                    </Button>
                  </TableToolbar.Item>
                  <TableToolbar.Item>
                    <Search size="small" />
                  </TableToolbar.Item>
                </TableToolbar.ItemGroup>
              </TableToolbar>
              <Table.Content />
            </Table>
          </Card>
        </Page.Content>
      </Page>
      <div
        style={{
          position: 'absolute',
          top: 0,
          right: `${right}px`,
          height: '100%',
          boxShadow:
            '0 3px 24px 0 rgba(22, 45, 61, 0.18), 0 8px 8px 0 rgba(22, 45, 61, 0.12)',
          transition: 'right 0.4s ease 0s',
          zIndex: 1000,
        }}
      >
        <SidePanel onCloseButtonClick={closePanel}>
          <SidePanel.Header title="Filter" />
          <SidePanel.Footer>
            <Button onClick={closePanel} priority="secondary" fullWidth>
              Close
            </Button>
          </SidePanel.Footer>
        </SidePanel>
      </div>
    </div>
  );
};
```

#### Quick view

Use side panels to provide quick views of list items.

Panels can either push the page content aside or overlay it, depending on the use case:

- Overlay content when part of the page's content can be covered.
- Push content aside when the user should see all the information and actions on the main page.

```jsx
() => {
  const [right, setRight] = React.useState(-440);
  const [records, setRecords] = React.useState([
    {
      image: <Avatar size="size36" name="Jenny Wilson" />,
    },
    {
      image: <Avatar size="size36" name="Robert Fox" />,
    },
    {
      image: <Avatar size="size36" name="Albert Flores" />,
    },
    {
      image: <Avatar size="size36" name="Floyd Miles" />,
    },
    {
      image: <Avatar size="size36" name="Esther Howard" />,
    },
    {
      image: <Avatar size="size36" name="Brooklyn Simmons" />,
    },
    {
      image: <Avatar size="size36" name="Kathryn Murphy" />,
    },
    {
      image: <Avatar size="size36" name="Dianne Russell" />,
    },
  ]);

  const columns = [
    {
      title: '',
      render: (row) => row.image,
    },
    {
      title: '',
      render: () => (
        <TableActionCell
          size="small"
          primaryAction={{
            text: 'View',
            onClick: () => {},
          }}
        />
      ),
    },
  ];

  const openPanel = () => {
    setRight(0);
  };

  const closePanel = () => {
    setRight(-440);
  };

  return (
    <div style={{ display: 'block', overflow: 'hidden', position: 'relative' }}>
      <Page height="780px" maxWidth={500}>
        <Page.Header title="Contacts" />
        <Page.Content>
          <Card>
            <Table data={records} columns={columns} onRowClick={openPanel}>
              <TableToolbar>
                <TableToolbar.ItemGroup position="start">
                  <TableToolbar.Item>
                    <TableToolbar.Label>8 contacts</TableToolbar.Label>
                  </TableToolbar.Item>
                </TableToolbar.ItemGroup>
              </TableToolbar>
              <Table.Content />
            </Table>
          </Card>
        </Page.Content>
      </Page>
      <div
        style={{
          position: 'absolute',
          top: 0,
          right: `${right}px`,
          height: '100%',
          boxShadow:
            '0 3px 24px 0 rgba(22, 45, 61, 0.18), 0 8px 8px 0 rgba(22, 45, 61, 0.12)',
          transition: 'right 0.4s ease 0s',
          zIndex: 1000,
        }}
      >
        <SidePanel onCloseButtonClick={closePanel}>
          <SidePanel.Header showDivider={false}>
            <Box direction="vertical" align="center" marginBottom="12px">
              <Avatar size="size72" />
            </Box>
            <Tabs
              items={[
                { id: 1, title: 'Overview' },
                { id: 2, title: 'Inbox' },
              ]}
              activeId={1}
              type="uniformSide"
              width="174px"
            />
          </SidePanel.Header>
        </SidePanel>
      </div>
    </div>
  );
};
```

#### Composer actions

Use side panels to display composer settings and actions. These should be anchored to the left edge of the screen since they're opened through the `<ComposerSidebar/>`.

```jsx
() => {
  const [selectedSidebar, setSelectedSidebar] = React.useState(0);
  const [activeTab, setActiveTab] = React.useState(0);
  const [toggleImage, setToggleImage] = React.useState(true);
  const [togglePosts, setTogglePosts] = React.useState(false);
  const [toggleCommenting, setToggleCommenting] = React.useState(false);
  const [descriptionValue, setDescriptionValue] = React.useState('');
  const [authorTags, setAuthorTags] = React.useState([]);
  const [categories, setCategories] = React.useState([
    {
      id: 0,
      label: 'Other posts',
      isChecked: false,
    },
    {
      id: 1,
      label: 'Recipes',
      isChecked: false,
    },
    {
      id: 2,
      label: 'Lifestyle',
      isChecked: false,
    },
  ]);
  const [publishDate, setPublishDate] = React.useState();
  const [themeTags, setThemeTags] = React.useState([
    { id: '1', label: 'Sport' },
    { id: '2', label: 'Routine' },
  ]);
  const [author, setAuthor] = React.useState();

  const items = [
    {
      id: 0,
      label: 'Settings',
      icon: <Icons.Settings />,
    },
    {
      id: 1,
      label: 'Categories',
      icon: <Icons.Category />,
    },
    {
      id: 2,
      label: 'Tags',
      icon: <Icons.Tag />,
    },
  ];

  const handleSelectTag = (tag, previousTags, setTags) =>
    setTags([...previousTags, { id: tag.id, label: tag.value }]);

  const handleRemoveTag = (tag, previousTags, setTags) =>
    setTags(previousTags.filter((currTag) => currTag.id !== tag));

  const handleSidebarClick = (id) => {
    setSelectedSidebar(id);
  };

  const handleCloseSidePanel = () => {
    setSelectedSidebar(null);
  };

  const renderSettingsPanel = () => (
    <SidePanel onCloseButtonClick={handleCloseSidePanel} width="300px">
      <SidePanel.Header title="Post settings" showDivider={false}>
        <Tabs
          items={[
            { id: 0, title: 'General' },
            { id: 1, title: 'Advanced' },
          ]}
          activeId={activeTab}
          type="uniformSide"
          width="114px"
          onClick={(value) => setActiveTab(Number(value.id))}
        />
      </SidePanel.Header>
      <SidePanel.Content></SidePanel.Content>
    </SidePanel>
  );

  const renderTagPanel = () => (
    <SidePanel onCloseButtonClick={handleCloseSidePanel} width="300px">
      <SidePanel.Header title="Tags" showDivider={false} />
      <SidePanel.Content />
    </SidePanel>
  );

  const renderCategoryPanel = () => {
    return (
      <SidePanel onCloseButtonClick={handleCloseSidePanel} width="300px">
        <SidePanel.Header title="Categories" showDivider={false} />
        <SidePanel.Content />
      </SidePanel>
    );
  };

  return (
    <Layout gap={0}>
      <Cell>
        <ComposerHeader backButtonValue="Back">
          <ComposerHeader.Actions justifyContent="flex-end">
            <ToggleButton labelValue="Undo">
              <Icons.Undo />
            </ToggleButton>
            <ToggleButton labelValue="Redo">
              <Icons.Redo />
            </ToggleButton>
          </ComposerHeader.Actions>
          <ComposerHeader.MainActions>
            <Button skin="inverted">Preview</Button>
            <Button>Publish</Button>
          </ComposerHeader.MainActions>
        </ComposerHeader>
      </Cell>
      <Cell>
        <Box direction="vertical" backgroundColor="D70">
          <Box gap="0" height="660px">
            <ComposerSidebar
              labelPlacement="bottom"
              items={items}
              selectedId={selectedSidebar}
              onClick={(_, { id }) => handleSidebarClick(id)}
            />
            {selectedSidebar === 0 && renderSettingsPanel()}
            {selectedSidebar === 1 && renderCategoryPanel()}
            {selectedSidebar === 2 && renderTagPanel()}
          </Box>
        </Box>
      </Cell>
    </Layout>
  );
};
```

## Code

```jsx
import { SidePanel } from '@wix/design-system';
```

### Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `backButtonDescription` | `ReactNode` | — | When provided, sets the content of the back button's tooltip. |
| `backButtonProps` | `SidePanelBackButtonProps` | — | Back button props. |
| `backButtonTooltipProps` | `TooltipCommonProps` | — | Allows to pass all common tooltip props to back button's tooltip. |
| `border` | `"end" \| "start"` | — | Applies a border to the chosen side of the panel (works only with standard skin). |
| `buttonText` | `string` | — | Has no effect. `<SidePanel/>` doesn't render it. |
| `children` | `ReactNode` | — | Accepts any item as a child element. For standard panel layout pass compound elements of the panel: * `<SidePanel.Header/>` * `<SidePanel.Content/>` * `<SidePanel.Footer/>` * `<SidePanel.Divider/>` |
| `closeButtonProps` | `SidePanelCloseButtonProps` | — | Close button props. |
| `dataHook` | `string` | — | Applies a data-hook HTML attribute to be used in the tests. |
| `draggable` | `boolean` | — | Specifies if panel is draggable (works only with floating skin). |
| `height` | `string \| number` | `'100%'` | Controls the height of the panel. |
| `helpButtonProps` | `SidePanelButtonProps` | — | Help button props. |
| `hideOverflow` | `boolean` | — | Hides all overflow of side panel. |
| `maxHeight` | `string \| number` | — | Controls the maximum height of the panel. |
| `onBackButtonClick` | `() => void` | — | Defines a callback function which is called every time a back button is clicked. |
| `onCloseButtonClick` | `() => void` | — | Defines a callback function which is called every time a close button is clicked. |
| `onHelpButtonClick` | `() => void` | — | Defines a callback function which is called every time a help button is clicked. |
| `ref` | `null \| string \| (instance: SidePanelComponent \| null) => void \| RefObject<SidePanelComponent>` | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). |
| `skin` | `"standard" \| "floating"` | — | Specifies the skin of the side panel. |
| `width` | `string \| number` | `'420px'` | Controls the width of the panel. |

## Testkit

Import the driver matching your test environment:

```jsx
// UniDriver
import { SidePanelUniDriver } from '@wix/design-system/dist/testkit/unidriver';

// Vanilla
import { SidePanelTestkit } from '@wix/design-system/dist/testkit';

// Puppeteer
import { SidePanelTestkit } from '@wix/design-system/dist/testkit/puppeteer';

// Testing Library
import { SidePanelTestkit } from '@wix/design-system/dist/testkit/testing-library';
```

### Driver methods

| Method | Description |
| --- | --- |
| `clickHelp` | Click help button |
| `clickClose` | Click close button |
| `clickBack` | Click back button |
| `getHelpButtonAriaLabel` | Get help button aria-label |
| `getCloseButtonAriaLabel` | Get close button aria-label |
| `getBackButtonAriaLabel` | Get back button aria-label |
| `getTitleText` | Get title text |
| `getPrefix` | Get Prefix element |
| `getSuffix` | Get Suffix element |
| `getContent` | Get Content Element |
| `getSubtitleText` | Get subtitle text |
| `getTooltipContent` | Get tooltip text |
| `getBackButtonTooltipContent` | Get back button tooltip content |
| `isHeaderDividerExists` | Check if divider exists |
| `isCloseButtonExists` | Check if close button exists |
| `isHelpButtonExists` | Check if help button exists |
| `isFooterDividerExists` | Check if divider exists |
| `isBackButtonExists` | Check if back button exists |
| `exists` | Checks whether the component found with the given data hook. |
| `element` | Gets the component root element. |
| `click` | Clicks on the component root element. |
| `base` | Returns UniDriver for the base element. |

## Changelog

- **1.340.0** (2026-10-21) — maintenance release, no component-specific changes
- **1.339.0** (2026-10-19) — maintenance release, no component-specific changes
- **1.338.0** (2026-10-15) — maintenance release, no component-specific changes
- **1.331.0** (2026-10-01) — maintenance release, no component-specific changes
- **1.330.3** (2026-09-29) — maintenance release, no component-specific changes
- **1.330.0** (2026-09-28) — maintenance release, no component-specific changes
- **1.329.0** (2026-09-24) — maintenance release, no component-specific changes
- **1.328.0** (2026-09-22) — maintenance release, no component-specific changes
- **1.325.0** (2026-09-17) — maintenance release, no component-specific changes
- **1.321.0** (2026-09-08) — feat: new `border` prop adds a border to the left or right edge of a standard-skin panel, for separating a docked panel from adjacent content (visible in themes that define a side panel border, such as odeditor-dark). ([#16958](invalid-url)) — has visual changes
- **1.320.1** (2026-09-04) — maintenance release, no component-specific changes
- **1.318.0** (2026-08-28) — maintenance release, no component-specific changes
- **1.313.1** (2026-08-18) — fix: restored the `SidePanel` and `SidePanel.Header` type exports used for typing refs (e.g. `useRef<SidePanel>(null)`), which were lost when the components were wrapped with `withDefaultProps`. ([#16824](invalid-url))
- **1.310.0** (2026-08-10) — maintenance release, no component-specific changes
- **1.299.0** (2026-07-17) — breaking: round standard skin, add shadow, shrink subtitle (Harmony theme) ([#16566](invalid-url)) — has visual changes
- **1.298.0** (2026-07-14) — fix: center-align header title with back/close buttons ([#16491](invalid-url)) — has visual changes
- **1.298.0** (2026-07-14) — breaking: update Header close/help button size and close button fill token ([#16532](invalid-url)) — has visual changes
- **1.292.0** (2026-06-22) — maintenance release, no component-specific changes
- **1.291.0** (2026-06-19) — maintenance release, no component-specific changes
- **1.289.0** (2026-06-17) — maintenance release, no component-specific changes
- **1.288.0** (2026-06-15) — fix: solid background fallback when backdrop-filter unsupported ([#16382](invalid-url))
- **1.288.0** (2026-06-15) — fix: use border-box on floating root to prevent overflow ([#16381](invalid-url))
- **1.277.0** (2026-05-07) — maintenance release, no component-specific changes
- **1.275.0** (2026-05-04) — feat: data-hook being public ([#16223](invalid-url))
- **1.273.0** (2026-04-30) — feat: add subtitle token and update header text sizes for odeditor-dark ([#16208](invalid-url))
- **1.272.0** (2026-04-27) — fix: onMouseDown accept event in SidePanelButtonProps type ([#16164](invalid-url))
- **1.270.0** (2026-04-20) — feat: new property hideoverflow ([#16153](invalid-url)) — has visual changes
- **1.269.0** (2026-04-15) — fix: added two new component level tokens for harmony dark side panel border ([#16140](invalid-url))
- **1.268.0** (2026-04-13) — fix: made standard skin also use the blur background color ([#16123](invalid-url))
- **1.266.0** (2026-04-07) — maintenance release, no component-specific changes
- **1.260.0** (2026-03-17) — maintenance release, no component-specific changes
- **1.254.0** (2026-02-03) — maintenance release, no component-specific changes
- **1.247.2** (2026-01-21) — maintenance release, no component-specific changes
- **1.247.0** (2026-01-13) — maintenance release, no component-specific changes
- **1.235.0** (2025-12-04) — maintenance release, no component-specific changes
- **1.233.0** (2025-12-01) — feat: added onMouseDown for SidePanel header buttons | E3-5563 ([#15598](invalid-url))
- **1.221.1** (2025-10-16) — fix: removed excessive space from back button in the SidePanel header ([#15416](invalid-url))
- **1.220.2** (2025-10-06) — maintenance release, no component-specific changes
- **1.220.0** (2025-09-29) — breaking: floating skin title in madefor display ([#15305](invalid-url))
- **1.217.0** (2025-09-08) — maintenance release, no component-specific changes
- **1.214.0** (2025-08-22) — maintenance release, no component-specific changes
- **1.213.0** (2025-08-19) — breaking: new header actions props ([#15190](invalid-url))
- **1.204.1** (2025-07-10) — maintenance release, no component-specific changes
- **1.198.0** (2025-06-07) — fix: deprecation messages ([#14966](invalid-url))
- **1.197.0** (2025-06-06) — feat: aria-label for back, close, help buttons ([#14928](invalid-url))
- **1.172.0** (2025-03-20) — maintenance release, no component-specific changes
- **1.161.0** (2025-02-12) — feat: add back button ([#14522](invalid-url))
- **1.139.0** (2024-11-07) — maintenance release, no component-specific changes
- **1.138.1** (2024-10-30) — maintenance release, no component-specific changes
- **1.129.0** (2024-09-25) — fix: move uni driver descriptions from the interface ([#14178](invalid-url))
- **1.120.1** (2024-08-08) — breaking: update vertical field padding for studio theme ([#14020](invalid-url))
- **1.115.0** (2024-07-17) — maintenance release, no component-specific changes
- **1.111.0** (2024-06-26) — maintenance release, no component-specific changes
- **1.104.1** (2024-05-14) — maintenance release, no component-specific changes
- **1.103.1** (2024-04-24) — maintenance release, no component-specific changes
- **1.103.0** (2024-04-23) — breaking: header affixes, floating skin header size change ([#13594](invalid-url))
- **1.102.0** (2024-04-16) — maintenance release, no component-specific changes
- **1.101.0** (2024-04-12) — maintenance release, no component-specific changes
- **1.97.2** (2024-03-04) — feat: replace content shifting scrollbar with overlay one ([#13354](invalid-url))
- **1.93.0** (2024-02-08) — maintenance release, no component-specific changes
- **1.92.1** (2024-02-05) — maintenance release, no component-specific changes