BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/octane/use-mobile

use-mobile

octane/use-mobile
FreeHook

octane publishes no description for this item.

Live preview

live · rendered by the registry
Rendered by octane on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/octanejs/octane/main/packages/shadcn/registry/use-mobile.json

Source

hooks/use-mobile.tsraw.githubusercontent.com/octanejs/octane/main/packages/shadcn/registry/use-mobile.json
1// Ported from shadcn-ui/ui@4baadbc6517070ae8f8feb2c97037adc2b305544
2// apps/v4/registry/bases/radix/hooks/use-mobile.ts. React hooks map onto
3// octane's; the explicit `[]` dependency array is retained from upstream
4// (subscribe once on mount). SSR-safe: `window` is only touched in the effect.
5import { useEffect, useState } from 'octane';
6
7const MOBILE_BREAKPOINT = 768;
8
9export function useIsMobile() {
10 const [isMobile, setIsMobile] = useState<boolean | undefined>(undefined);
11
12 useEffect(() => {
13 const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
14 const onChange = () => {
15 setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
16 };
17 mql.addEventListener('change', onChange);
18 setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
19 return () => mql.removeEventListener('change', onChange);
20 }, []);
21
22 return !!isMobile;
23}

Files it writes

  • hooks/use-mobile.ts

Facts

Registry
octane
Type
registry:hook
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-07
Last confirmed
yesterday

Go to the source

Docs on octane octanejs.dev octanejs/octane on GitHub Raw registry item This item as JSON

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex