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. Required fields are marked *

Related Post

PrésentationPrésentation

Bonjour, je suis Develle TCHENGUE, cheffe de projet digital et social media manager, passionnée par l’organisation et l’impact des bons messages au bon moment. Curieuse et toujours en quête d’amélioration, je

Learn with HubSpot 変化の時代に求められる「即効性」実現の実践術Learn with HubSpot 変化の時代に求められる「即効性」実現の実践術

こんにちは。HubSpotにてイベントを担当しております松本です。   2025年7月8日(火)〜7月11日(金)毎日12:00から、下記テーマについてオンラインイベントを開催いたします。   =========== Learn with HubSpot 変化の時代に求められる「即効性」実現の実践術 開催日時:2025年7月8日(火)〜7月11日(金)毎日12:00から配信 =========== HubSpot & パートナー企業 全10社が登壇! 本イベントでは営業・マーケティング・カスタマーサービスの各領域で「いち早く成果につなげる」ための戦略や実践的な手法を、HubSpotと業界最前線で活躍するHubSpotパートナー企業9社が各社の強みや実績から独自の切り口で解説。最新のトレンドも取り入れながら、多面的な視点からビジネスの最適解を探ります。   今回はプレゼンテーション形式のセッションに加え、ワークショップ形式のセッションもご用意しています。気になるテーマのセッションにぜひご参加ください。   ▼ウェビナーへの詳細・お申し込みはこちらから▼