Skip to Content
文档

出血

用于将元素从其容器边界中分离出来。

SourceStorybook
Bleed

Some Heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

用法

¥Usage

import { Bleed } from "@chakra-ui/react"
<Bleed>
  <div />
</Bleed>

示例

¥Examples

垂直

¥Vertical

使用 block 属性使元素垂直出血。

¥Use the block prop to make the element bleed vertically.

Bleed

特定方向

¥Specific Direction

使用 inlineStartinlineEndblockStartblockEnd 属性使元素沿特定方向出血。

¥Use the inlineStart, inlineEnd, blockStart, and blockEnd props to make the element bleed in a specific direction.

inlineStart
inlineEnd
blockStart
blockEnd

属性

¥Props

PropDefaultType
inline
SystemStyleObject['marginInline'] | undefined

The negative margin on the x-axis

block
SystemStyleObject['marginBlock'] | undefined

The negative margin on the y-axis

inlineStart
SystemStyleObject['marginInlineStart'] | undefined

The negative margin on the inline-start axis

inlineEnd
SystemStyleObject['marginInlineEnd'] | undefined

The negative margin on the inline-end axis

blockStart
SystemStyleObject['marginBlockStart'] | undefined

The negative margin on the block-start axis

blockEnd
SystemStyleObject['marginBlockEnd'] | undefined

The negative margin on the block-end axis

as
React.ElementType

The underlying element to render.

asChild
boolean

Use the provided child element as the default rendered element, combining their props and behavior.

For more details, read our Composition guide.

Previous

宽高比

Next

盒子