Measured entry

shadcn-direction

transition-effectunclassified

A client-side React wrapper around Radix UI's direction context. It ships as a source module exporting DirectionProvider and useDirection, renders no DOM of its own, and depends on React plus the radix-ui package.

Specimen
Harness screenshot of shadcn-direction at 375 pixels wide
Harness screenshot at 375 pixels wide. No horizontal overflow recorded.
Harness screenshot of shadcn-direction at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of shadcn-direction at 1440 pixels wide
Harness screenshot at 1440 pixels wide. No horizontal overflow recorded.

Measured

Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.

Harness measurements recorded for shadcn-direction
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowclean at 375, 768, 1440
Axe critical0
Axe serious0
Axe moderate2
Axe minor0
Gzip marginal20.6 KB (86.1 KB build, 65.5 KB baseline)
Bare modeFAIL
Provider requiredNO
Demo usedwritten from the component source API

What the harness recorded

BARE BUILD

✗ Build failed in 781ms
error during build:
[vite]: Rollup failed to resolve import "radix-ui" from "<sandbox>re-35b9675e99ae/src/cut/components/ui/direction.tsx".

Verdict

Use it as a small compatibility wrapper when direction must flow through Radix context. It builds and mounts cleanly, but it is infrastructure rather than a transition effect and produces no visible output by itself.

Use it if

  • You need one shared direction value for Radix-aware descendants.
  • You want components to read left-to-right or right-to-left state through a hook.
  • Your app already uses the consolidated radix-ui package and client components.

Skip it if

  • You need a visible transition effect or standalone UI element.
  • Setting the document dir attribute already covers every component in your app.
  • You use individual Radix packages and do not want the consolidated radix-ui dependency.

Install

Installation record for shadcn-direction
Declared dependenciesnone declared
Missing on installnone
Bare installfails once the shadcn-style helpers are removed, so it needs that setup
Providerno provider required in the harness

In a non-shadcn React project, copy the source module, install radix-ui, preserve the client-component directive where required, and wrap the relevant subtree with DirectionProvider. Consumers can import useDirection from the same module.

Source and credit

This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.

Author repository

github.com/shadcn-ui/ui
License
MIT
Record published
2026-08-18

Alternatives

Other published entries for the transition-effect pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.