Movatterモバイル変換


[0]ホーム

URL:


Framework:


Hire UsGet CoreUI PRO all-access

React Offcanvas Component API

Offcanvas API

Explore the API reference for theReact Offcanvas component and discover how to effectively utilize its props for customization.

COffcanvas#

import{COffcanvas}from'@coreui/react'
// or
importCOffcanvasfrom'@coreui/react/src/components/offcanvas/COffcanvas'
PropertyDefaultType
backdrop#trueboolean,'static'

Apply a backdrop on body while offcanvas is open.

className#-string

A string of all className you want applied to the base component.

dark#-boolean

Sets a darker color scheme.

keyboard#trueboolean

Closes the offcanvas when escape key is pressed.

onHide#-() => void

Callback fired when the component requests to be hidden.

onShow#-() => void

Callback fired when the component requests to be shown.

placement#-'start','end','top','bottom'

Components placement, there’s no default placement.

portal#falseboolean

Generates modal using createPortal.

responsive#4.6.0+trueboolean,'sm','md','lg','xl','xxl'

Responsive offcanvas property hide content outside the viewport from a specified breakpoint and down.

scroll#falseboolean

Allow body scrolling while offcanvas is open

visible#falseboolean

Toggle the visibility of offcanvas component.

COffcanvasBody#

import{COffcanvasBody}from'@coreui/react'
// or
importCOffcanvasBodyfrom'@coreui/react/src/components/offcanvas/COffcanvasBody'
PropertyDefaultType
className#-string

A string of all className you want applied to the base component.

COffcanvasHeader#

import{COffcanvasHeader}from'@coreui/react'
// or
importCOffcanvasHeaderfrom'@coreui/react/src/components/offcanvas/COffcanvasHeader'
PropertyDefaultType
className#-string

A string of all className you want applied to the base component.

COffcanvasTitle#

import{COffcanvasTitle}from'@coreui/react'
// or
importCOffcanvasTitlefrom'@coreui/react/src/components/offcanvas/COffcanvasTitle'
PropertyDefaultType
as#h5(ElementType & 'symbol'),(ElementType & 'object'),(ElementType & 'h5'),(ElementType & 'slot'),(ElementType & 'style'),... 174 more ...,(ElementType & FunctionComponent<...>)

Component used for the root node. Either a string to use a HTML element or a component.

className#-string

A string of all className you want applied to the component.

CoreUI for React is Open Source UI Components Library for React.js.

CoreUI code licensedMIT, docsCC BY 3.0. CoreUI PRO requires acommercial license.


[8]ページ先頭

©2009-2025 Movatter.jp