avatar
UI
Components
Changelog
LobeHub UI
Antd Components
Lucide Icons
CSSinJS
Ctrl
K
Chat
ChatInputArea
ChatItem
EditableMessage
Data Display
Card
ChatMarkdown
CollapseGroup
Descriptions
Highlighter
JsonViewer
LogViewer
ProCard
RichTextEditor
Status
Table
Tree
Data Entry
CodeEditor
Form
Mentions
MonacoEditor
SelectCard
SliderInput
Feedback
Alert
DragPanel
Drawer
Modal
Notification
General
Breadcrumb
Typography
WaveformIcon
Layout
Divider
Page
Navigation
ButtonGroup
Dropdown
Theme
ConfigProvider
Logo
TTS
useSpeechSynthes
Utils
FormHelper

Drawer

A panel that slides out from the edge of the screen.

import { Drawer } from '@yuntijs/ui';
NPM
UNPKG
BundlePhobia
PackagePhobia
Anvaka Graph
Source
Edit
Previous
DragPanel
Next
Modal

Resources

Lobe UI-AIGC Components
Lobe Icon-AI / LLM Icon Collection
Lobe Charts-Modern Charts
Lobe TTS-TTS / STT Library

Community

Report Bug
Request Feature

Help

GitHub
Changelog

More Products

🤯 Lobe Chat-AI / LLM Chat Framework
🧸 Lobe Vidol-Virtual Idols for EveryOne
🅰️ Lobe Theme-Stable Diffusion Extension
🌐 Lobe i18n-AI i18next CLI
Copyright © 2022-2026
Made with ☁️ by YuntiJS
LobeHub

Usage

based on antd Drawer component.

Simple usage

JSX
import { Button, Drawer, Flex, Space } from '@yuntijs/ui';
import React, { useState } from 'react';

export default () => {
  const [open, setOpen] = useState(false);

  const showDrawer = () => {
    setOpen(true);
  };

  const onClose = () => {
    setOpen(false);
  };

  return (
    <div>
      <Button type="primary" onClick={showDrawer}>
        Open
      </Button>
      <Drawer
        title="YuntiUI Drawer"
        onClose={onClose}
        open={open}
        extra={<Button>Action</Button>}
        footer={
          <Flex justify="flex-end" gap={16}>
            <Button>取消</Button>
            <Button type="primary">确定</Button>
          </Flex>
        }
      >
        <p>
          The YuntiUI components are inspired by LobeUI and developed based on Antd components,
          fully compatible with Antd components, and it is recommended to use antd-style as the
          default css-in-js styling solution.
        </p>
      </Drawer>
    </div>
  );
};

Playground

APIs

NameDescriptionTypeDefault
size--"large"|"default"--
open--boolean--
afterOpenChange--(open:boolean)=>void--
visible--boolean--
afterVisibleChange--(open:boolean)=>void--
classNames--{header?:string;body?:string;footer?:string}--
styles--{header?:object;body?:object;footer?:object}--
destroyOnClose--boolean--
destroyOnHidden--boolean--
children--ReactNode--
loading--boolean--
title--ReactNode--
extra--ReactNode--
footer--ReactNode--
closableRecommend to use closeIcon instead e.g. `<Drawer closeIcon={false} />`any--
maskStyle--{}--
onClose--(e:React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element>)=>void--
closeIcon--ReactNode--
headerStyle--{}--
bodyStyle--{}--
footerStyle--{}--
contentWrapperStyle--{}--
drawerStyle--{}--
closeIconPlacementThe placement of the close icon. When the value is auto and extra if present, the close button is left, and right if not."auto"|"left"|"right""right"