Export useNarrowContainer from the package index (container-width layouts in consumers)

Open
#705 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@Foxhoundn is already working on this.

Since Oct 7, 2026.

Assessment

This issue has not been assessed yet.

Description

What the landing page needs

useNarrowContainer (src/hooks/useNarrowContainer.ts) exported from the package index, next to useReqoreProperty:

import { useNarrowContainer } from '@qoretechnologies/reqore';

Today it is only reachable as @qoretechnologies/reqore/dist/hooks/useNarrowContainer.

Why

qorus.cloud's "How it works" diagram (qorus-saas-landing PR #19, redesign package WP6) puts HTML words around an SVG: system tiles on the left, labels beside a node. Under about 680px of its own width the words no longer fit, and the diagram switches to a stacked "strip" of Reqore callouts. That is a container-width decision, not a viewport one: Reqore's isMobile (480px) leaves small tablets and phones in landscape squeezed, and a CSS container query does not work through styled-components 5 (the hook's own comment explains why). useNarrowContainer is exactly the measurement needed.

A deep dist/ import would work, but the site keeps to the package's public entry: in the site's Vitest/Storybook runs a new deep import is discovered after the dependency pre-bundle and re-optimises it mid-run ("Failed to fetch dynamically imported module").

What the site does meanwhile

A ten-line local hook (ResizeObserver on the diagram's wrapper, the screen width as the first guess) in src/components/home/ConvergenceDiagram.tsx, marked TODO(reqore) with this issue; it is swapped for the import once a release exports the hook.

Dominant language
TypeScript
Stars
4
Forks
0
Avg merge
16h 28m
Merged PRs (30d)
9

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from qoretechnologies/reqore

All issues in qoretechnologies/reqore

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.