SxQRCode (二维码)
- Implemented
生成并展示 QR Code 二维码。
使用场景
- 分享链接与信息
- 登录二维码
- 设备配对码
约束说明
Value不能为空字符串。Size为像素尺寸。
行为说明
Value变化时重新生成二维码。Disabled为真时降低透明度。
API
Parameters (参数)
| 状态 | 参数名 | 类型 | 默认值 | 描述 |
|---|---|---|---|---|
| Implemented | Value |
string |
"" |
二维码内容。 |
| Implemented | Size |
int |
128 |
像素尺寸。 |
| Implemented | ForegroundColor |
string |
"#000000" |
前景色。 |
| Implemented | BackgroundColor |
string |
"#ffffff" |
背景色。 |
| Implemented | Disabled (继承) |
bool |
false |
禁用状态。 |
| Implemented | Id (继承) |
string? |
null |
组件 Id。 |
| Implemented | Class (继承) |
string? |
null |
CSS 类名。 |
| Implemented | Style (继承) |
string? |
null |
自定义样式。 |
| Implemented | Title (继承) |
string? |
null |
HTML title。 |
| Implemented | AdditionalAttributes (继承) |
IEnumerable<KeyValuePair<string, object>>? |
null |
额外属性。 |
示例
<SxQRCode Value="https://nextui.com" Size="160" />