# 引用

## 使用方法

`Blockquote` 用于展示引用的文本，例如推荐语、评论摘录或文档中引用的外部内容，在视觉上与普通段落区分开。从独立入口导入即可，结构样式会随组件自动加载：

主题在应用入口引入一次：

```ts
import '@astryx-vue/themes/neutral.css'
```

组件用法：

```vue
<script setup lang="ts">
import { Blockquote } from '@astryx-vue/core/Blockquote'
</script>

<template>
  <Blockquote cite="Steve Jobs">
    设计不仅关乎外观与感受，更关乎如何运作。
  </Blockquote>
</template>
```

### 结构

- **竖线**: 行首一侧的边线，用 --color-border-emphasized 绘制。
- **引文**: 默认插槽里的引用内容，画在 blockquote 元素里。
- **出处**: 来源，通过 cite 传入，画成引文下方的 cite 元素。

## 最佳实践

| 指引 | 实践 |
| --- | --- |
| 推荐 | 用于引用文本、推荐语或来自外部来源的高亮摘录。 |
| 推荐 | 引用来源已知时，提供 cite 属性。 |
| 避免 | 用于提示或信息说明。应使用提示条（Banner）。 |

## 示例

### 用户评价

评价区里的多条引言，排成卡片网格。和 Card、Grid 一起用来做社会证明布局。

```vue
<script setup lang="ts">
import { Blockquote } from '@astryx-vue/core/Blockquote'
import { Card } from '@astryx-vue/core/Card'
import { Grid, GridSpan } from '@astryx-vue/core/Grid'
</script>

<template>
  <Grid :columns="2" :gap="3" style="max-width: 600px">
    <Card :padding="4">
      <Blockquote cite="Sarah K., Lead Engineer">
        Shipping UI has never been this fast. Our team went from design to production in a single afternoon.
      </Blockquote>
    </Card>
    <Card :padding="4">
      <Blockquote cite="Marcus T., Product Designer">
        The token system means every new screen just looks right — no manual color or spacing decisions.
      </Blockquote>
    </Card>
    <GridSpan :columns="2">
      <Card :padding="4">
        <Blockquote cite="Priya L., Engineering Manager">
          Onboarding a new engineer used to take a week of design review. Now they're shipping accessible, polished components on day one.
        </Blockquote>
      </Card>
    </GridSpan>
  </Grid>
</template>
```

### 带来源

一条普通引言，和一条用来源 cite 署名的引言。已知作者或出处时使用 cite。

```vue
<script setup lang="ts">
import { Blockquote } from '@astryx-vue/core/Blockquote'
</script>

<template>
  <Blockquote>
    Design is not just what it looks like and feels like. Design is how it works.
  </Blockquote>
  <Blockquote cite="Steve Jobs">
    The people who are crazy enough to think they can change the world are the ones who do.
  </Blockquote>
</template>
```

## Props

| 名称 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| `cite` | `string \| number` | — | 可选的作者或出处，渲染在语义化的 `<footer>` 与 `<cite>` 元素中。 |

## 插槽

| 名称 | 说明 |
| --- | --- |
| `default` | 引用内容。 |
| `cite` | 富文本出处。提供时覆盖同名 Prop。 |

## 原生属性

根元素为 `<blockquote>`。

以下内容传入根元素：

- HTML 属性。
- `aria-*` 属性。
- `data-*` 属性。
- `class`。
- `style`。
- 原生事件监听器。
