GOGETMUSCLE Community scrolling Box in @hubspot/ui-extensions

scrolling Box in @hubspot/ui-extensions

hii guys

Thanks in advance

I am creating a box that contains multiple data sets. I want the content inside the box to be scrollable. I have attached my code for reference — could you please review it, correct any issues, and guide me on how to achieve the desired scroll functionality?

import React, { useState } from ‘react’;
import {
  Button,
  Modal,
  ModalBody,
  Text,
  Box,
  Flex,
  hubspot,
} from ‘@hubspot/ui-extensions’;

hubspot.extend(() => <Extension />);

const Extension = () => {
  return (
    <Button
      overlay={
        <Modal id=“scroll-modal” title=“Scrollable List” width=“md”>
        <ModalBody>
  <Box
    direction=“column”
    height=“400px”          // Limit height of scrollable container
    overflow=“auto”         // Enable scroll
    padding=“sm”
    gap=“sm”
  >
    <ScrollableList />
  </Box>
</ModalBody>

        </Modal>
      }
    >
      Open Scrollable Modal
    </Button>
  );
};

const ScrollableList = () => {
  return (
    <Box direction=“column” gap=“xs”>
      {Array.from({ length: 100 }).map((_, i) => (
        <Box key={i}>
          <Text>Item {i + 1}</Text>
        </Box>
      ))}
    </Box>
  );
};


Leave a Reply

Your email address will not be published.

Related Post

AI Agent APIAI Agent API

Hi team,I would like to learn more about the publicly exposed APIs (accessible via Postman) for the HubSpot AI Agents. Specifically, I am interested in understanding their aliasing, agent versions,

Webinar | Einheitliche Datenbasis, Intelligentes Wachstum: Produktneuheiten (30. Sept 2025, 10 Uhr)Webinar | Einheitliche Datenbasis, Intelligentes Wachstum: Produktneuheiten (30. Sept 2025, 10 Uhr)

Einheitliche Datenbasis, Intelligentes Wachstum: Produktneuheiten vom Fall Spotlight 2025   In diesem Webinar zeigen wir dir, wie du unstrukturierte Informationen aus E-Mails, Calls und Chat-Verläufen in eine verlässliche Grundlage für Geschäftsentscheidungen verwandeln kannst.