mirror of
https://github.com/hunvreus/basecoat.git
synced 2026-11-17 15:38:30 +00:00
Prepare 1.0.0-beta.3
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
|
||||
## Usage
|
||||
|
||||
Use `.avatar`, `.avatar-sm`, or `.avatar-lg` on a small inline container. Put the image first and a fallback `<span>` after it.
|
||||
Add `class="avatar"` to a small inline container. Add `data-size="sm"` or `data-size="lg"` when needed. Put the image first and a fallback `<span>` after it.
|
||||
|
||||
```html
|
||||
<span class="avatar">
|
||||
@@ -43,23 +43,23 @@ Use `.avatar`, `.avatar-sm`, or `.avatar-lg` on a small inline container. Put th
|
||||
### HTML structure
|
||||
|
||||
<dl>
|
||||
<dt><code class="highlight language-html"><div class="avatar-group"></code> <span class="badge-secondary">Optional</span></dt>
|
||||
<dt><code><div class="avatar-group"></code> <span class="badge" data-variant="secondary">Optional</span></dt>
|
||||
<dd>
|
||||
Optional parent that groups avatars with overlap.
|
||||
<dl>
|
||||
<dt><code class="highlight language-html"><span class="avatar|avatar-sm|avatar-lg"></code></dt>
|
||||
<dt><code><span class="avatar"></code></dt>
|
||||
<dd>
|
||||
Avatar root. Use <code>.avatar-sm</code>, <code>.avatar</code>, or <code>.avatar-lg</code>. Use it standalone or as a direct child of <code>.avatar-group</code>.
|
||||
Avatar root. Use it standalone or as a direct child of <code>.avatar-group</code>. Add <code>data-size="sm"</code> or <code>data-size="lg"</code> for alternate sizes.
|
||||
<dl>
|
||||
<dt><code class="highlight language-html"><img></code> <span class="badge-secondary">Optional</span></dt>
|
||||
<dt><code><img></code> <span class="badge" data-variant="secondary">Optional</span></dt>
|
||||
<dd>The avatar image. Provide meaningful <code>alt</code> text.</dd>
|
||||
<dt><code class="highlight language-html"><span></code></dt>
|
||||
<dt><code><span></code></dt>
|
||||
<dd>Fallback initials or icon.</dd>
|
||||
<dt><code class="highlight language-html"><span data-badge></code> <span class="badge-secondary">Optional</span></dt>
|
||||
<dt><code><span data-badge></code> <span class="badge" data-variant="secondary">Optional</span></dt>
|
||||
<dd>Status badge positioned at the block-end inline-end corner.</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt><code class="highlight language-html"><span data-count></code> <span class="badge-secondary">Optional</span></dt>
|
||||
<dt><code><span data-count></code> <span class="badge" data-variant="secondary">Optional</span></dt>
|
||||
<dd>Count or icon indicator displayed at the end of the group.</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
@@ -136,7 +136,7 @@ Use `.avatar`, `.avatar-sm`, or `.avatar-lg` on a small inline container. Put th
|
||||
|
||||
<Preview>
|
||||
<div class="flex flex-wrap items-center gap-2 grayscale">
|
||||
<span class="avatar-sm">
|
||||
<span class="avatar" data-size="sm">
|
||||
<img src="https://github.com/shadcn.png" alt="@shadcn" />
|
||||
<span>CN</span>
|
||||
</span>
|
||||
@@ -144,7 +144,7 @@ Use `.avatar`, `.avatar-sm`, or `.avatar-lg` on a small inline container. Put th
|
||||
<img src="https://github.com/shadcn.png" alt="@shadcn" />
|
||||
<span>CN</span>
|
||||
</span>
|
||||
<span class="avatar-lg">
|
||||
<span class="avatar" data-size="lg">
|
||||
<img src="https://github.com/shadcn.png" alt="@shadcn" />
|
||||
<span>CN</span>
|
||||
</span>
|
||||
@@ -155,7 +155,7 @@ Use `.avatar`, `.avatar-sm`, or `.avatar-lg` on a small inline container. Put th
|
||||
|
||||
<Preview>
|
||||
<div class="dropdown-menu">
|
||||
<button type="button" id="avatar-dropdown-trigger" aria-haspopup="menu" aria-controls="avatar-dropdown-menu" aria-expanded="false" class="btn-icon-ghost rounded-full">
|
||||
<button type="button" id="avatar-dropdown-trigger" aria-label="Open user menu" aria-haspopup="menu" aria-controls="avatar-dropdown-menu" aria-expanded="false" class="btn rounded-full" data-variant="ghost" data-size="icon">
|
||||
<span class="avatar">
|
||||
<img src="https://github.com/shadcn.png" alt="@shadcn" />
|
||||
<span>CN</span>
|
||||
|
||||
Reference in New Issue
Block a user