BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/adn-ui/drawer

Drawer

adn-ui/drawer
FreeComponent

A panel that slides in from the edge of the screen with swipe gestures.

Live preview

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

Install it

npx shadcn@latest add https://ui.awaiden.com/r/drawer.json

Source

src/components/ui/drawer/drawer.tsxui.awaiden.com/r/drawer.json
1"use client";
2
3import "./drawer.css";
4import { Drawer as BaseDrawer } from "@base-ui/react/drawer";
5import React from "react";
6import { cn } from "tailwind-variants";
7
8import { DrawerContext, useDrawerContext } from "./drawer.context";
9import { drawerVariants, type DrawerVariants } from "./drawer.variants";
10
11export type DrawerProviderProps = React.ComponentProps<typeof BaseDrawer.Provider>;
12
13export const DrawerProvider = (props: DrawerProviderProps) => {
14 return <BaseDrawer.Provider {...props} />;
15};
16
17export type DrawerIndentBackgroundProps = React.ComponentProps<typeof BaseDrawer.IndentBackground>;
18
19export const DrawerIndentBackground = (props: DrawerIndentBackgroundProps) => {
20 return <BaseDrawer.IndentBackground {...props} />;
21};
22
23export type DrawerIndentProps = React.ComponentProps<typeof BaseDrawer.Indent>;
24
25export const DrawerIndent = (props: DrawerIndentProps) => {
26 return <BaseDrawer.Indent {...props} />;
27};
28
29const SIDE_TO_SWIPE_DIRECTION: Record<
30 NonNullable<DrawerVariants["side"]>,
31 React.ComponentProps<typeof BaseDrawer.Root>["swipeDirection"]
32> = {
33 bottom: "down",
34 top: "up",
35 left: "left",
36 right: "right",
37};
38
39export type DrawerProps = DrawerVariants & React.ComponentProps<typeof BaseDrawer.Root>;
40
41export const DrawerRoot = ({
42 children,
43 side = "bottom",
44 swipeDirection,
45 ...props
46}: DrawerProps) => {
47 const slots = drawerVariants({ side });
48 const resolvedSwipeDirection = swipeDirection ?? (side ? SIDE_TO_SWIPE_DIRECTION[side] : "down");
49
50 return (
51 <DrawerContext.Provider value={{ slots }}>
52 <BaseDrawer.Root swipeDirection={resolvedSwipeDirection} {...props}>
53 {children}
54 </BaseDrawer.Root>
55 </DrawerContext.Provider>
56 );
57};
58
59export type DrawerTriggerProps = React.ComponentProps<typeof BaseDrawer.Trigger> & {
60 render?: React.ReactElement;
61 asChild?: boolean;
62};
63
64export const DrawerTrigger = ({
65 className,
66 children,
67 render,
68 asChild: _asChild,
69 ...props
70}: DrawerTriggerProps) => {
71 const { slots } = useDrawerContext();
72 const renderElement = render ?? (React.isValidElement(children) ? children : undefined);
73 return (
74 <BaseDrawer.Trigger
75 className={cn(slots.trigger(), className)}
76 {...props}
77 {...(renderElement ? { render: renderElement } : { children })}
78 />
79 );
80};
81
82export type DrawerSwipeAreaProps = React.ComponentProps<typeof BaseDrawer.SwipeArea>;
83
84export const DrawerSwipeArea = (props: DrawerSwipeAreaProps) => {
85 return <BaseDrawer.SwipeArea {...props} />;
86};
87
88// … truncated

What it pulls in

npm packages

  • @base-ui/react
  • tailwind-variants

Files it writes

  • src/components/ui/drawer/drawer.tsx
  • src/components/ui/drawer/drawer.variants.ts
  • src/components/ui/drawer/drawer.context.ts
  • src/components/ui/drawer/drawer.css
  • src/components/ui/drawer/index.ts

Facts

Registry
adn-ui
Type
registry:ui
Access
Free
Files written
5
Licence
MIT
In the index
at or before 2026-08-10
Last confirmed
today

Go to the source

Docs on adn-ui ui.awaiden.com awaiden/adn-ui on GitHub Raw registry item This item as JSON

More from adn-ui

All 48 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Accordionaccordionadn-uiComponentsFree2 deps · 5 files
Alert Dialogalert-dialogadn-uiComponentsFree2 deps · 5 files
Aspect Ratioaspect-ratioadn-uiComponentsFree1 dep · 4 files
Autocompleteautocompleteadn-uiComponentsFree2 deps · 5 files
Avataravataradn-uiComponentsFree2 deps · 5 files
Badgebadgeadn-uiComponentsFree1 dep · 4 files
Breadcrumbbreadcrumbadn-uiComponentsFree1 dep · 5 files
Buttonbuttonadn-uiComponentsFree1 dep · 4 files

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 from measured facts

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