BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/loomui/macbook

MacBook

loomui/macbook
FreeComponent

A laptop frame with the camera housing cut into the display and the scoop cut into its base.

Live preview

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

Install it

npx shadcn@latest add https://loomui.design/r/macbook.json

Source

registry/loomui/macbook.tsxloomui.design/r/macbook.json
1import * as React from "react"
2
3import { cn } from "@/lib/utils"
4
5export interface MacBookProps extends React.ComponentProps<"div"> {
6 /** Largest width the machine is drawn at, in pixels. It shrinks below this. */
7 width?: number
8 /** Screenshot to fill the screen with. */
9 src?: string
10 /** Description of the screenshot. Required whenever `src` is set. */
11 alt?: string
12 /** Draw the camera housing cut into the top of the display. */
13 notch?: boolean
14 /** Draw the base the lid stands on. */
15 base?: boolean
16}
17
18/**
19 * MacBook Pro 14" in points. The base is a little wider than the lid, which is
20 * the only reason the machine reads as standing on something rather than
21 * floating above a bar.
22 */
23const LID_WIDTH = 1544
24const LID_HEIGHT = 1014
25const BASE_WIDTH = 1600
26const BASE_HEIGHT = 26
27
28export function MacBook({
29 children,
30 src,
31 alt = "",
32 width = 620,
33 notch = true,
34 base = true,
35 className,
36 style,
37 ...props
38}: MacBookProps) {
39 const height = LID_HEIGHT + (base ? BASE_HEIGHT : 0)
40
41 // Shares of the whole machine's width, so the lid, the base and the scoop
42 // stay in step with each other at any size.
43 const cq = (points: number) =>
44 `${((points / BASE_WIDTH) * 100).toFixed(4)}cqw`
45
46 return (
47 <div
48 data-slot="macbook"
49 className={cn("relative w-full", className)}
50 style={{
51 maxWidth: width,
52 aspectRatio: `${BASE_WIDTH} / ${height}`,
53 containerType: "inline-size",
54 ...style,
55 }}
56 {...props}
57 >
58 {/* The lid. Narrower than the base and centred on it. */}
59 <div
60 className="mx-auto bg-linear-to-br from-neutral-500 via-neutral-700 to-neutral-600 shadow-xl"
61 style={{
62 width: cq(LID_WIDTH),
63 height: cq(LID_HEIGHT),
64 borderRadius: cq(22),
65 padding: cq(16),
66 }}
67 >
68 <div
69 className="relative h-full w-full overflow-hidden bg-neutral-200 dark:bg-neutral-800"
70 style={{ borderRadius: cq(8) }}
71 >
72 {src ? (
73 <img src={src} alt={alt} className="h-full w-full object-cover" />
74 ) : (
75 children
76 )}
77
78 {/* The camera housing is bezel that intrudes into the display, so it
79 is drawn over the screen rather than around it. */}
80 {notch ? (
81 <span
82 aria-hidden="true"
83 className="absolute top-0 left-1/2 -translate-x-1/2 bg-neutral-900"
84 style={{
85// … truncated

What it pulls in

Other registry items

  • utils

Files it writes

  • registry/loomui/macbook.tsx

Facts

Registry
loomui
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-20
Last confirmed
yesterday

Go to the source

Docs on loomui loomui.design rjcuff/Loom-UI on GitHub Raw registry item This item as JSON

More from loomui

All 91 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Aurora Backdropaurora-backdroploomuiComponentsFreeno deps
Bento Gridbento-gridloomuiComponentsFreeno deps
Card Stackcard-stackloomuiComponentsFreeno deps
Compare Slidercompare-sliderloomuiComponentsFreeno deps
Confetti Buttonconfetti-buttonloomuiComponentsFreeno deps
Count Upcount-uploomuiComponentsFreeno deps
Credit Cardcredit-cardloomuiComponentsFreeno deps
DrawerdrawerloomuiComponentsFree1 dep

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

KitGrade

SaaS starter kits, scored on what can be checked

kitgrade.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 KitGrade

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 KitGrade

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 KitGrade

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