Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Autocomplete
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Checkbox Group
- Collapsible
- Combobox
- Command
- Context Menu
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Fieldset
- Form
- Frame
- Group
- Input
- Input Group
- Kbd
- Label
- Menu
- Menubar
- Message
- Meter
- Number Field
- OTP Field
- Pagination
- Popover
- Preview Card
- Progress
- Questionnaire
- Radio Group
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Toolbar
- Tooltip
Shared
- Artifact
- Audio Player
- Canvas
- Chain of Thought
- Checkpoint
- Code Block
- Commit
- Connection
- Context
- Controls
- Edge
- Environment Variables
- Mic Selector
- Model Selector
- Node
- Node Toolbar
- Open in Chat
- Panel
- Plan
- Prompt Input
- Queue
- Reasoning
- Sandbox
- Schema Display
- Shimmer
- Snippet
- Sources
- Speech Input
- Stack Trace
- Suggestion
- Tool
- Transcription
- Web Preview
Hooks
Resources
useIsomorphicLayoutEffect
SSR-safe useLayoutEffect alias.
A drop-in replacement for useLayoutEffect that falls back to useEffect on the server. Eliminates the SSR "useLayoutEffect does nothing" warning without branching at each call site.
Installation
pnpm dlx shadcn@latest add @frontal-labs/use-isomorphic-layout-effect
Usage
import { useIsomorphicLayoutEffect } from "@/hooks/use-isomorphic-layout-effect";
function Measured() {
useIsomorphicLayoutEffect(() => {
// DOM measurement safe to run in browser, no-op warning on server
}, []);
return <div />;
}API
const useIsomorphicLayoutEffect: typeof useEffect;Resolves to useLayoutEffect in the browser and useEffect when window is undefined. Same signature as both.
On This Page