Dùng Skeleton khi biết hình dạng cuối; truyền width và height bằng kích thước cuối để không đổi bố cục.
Animation mặc định là pulse; animation={false} cho bản tĩnh, wave thực chất là bounce.
Component không tự đặt aria-hidden, vùng status hay xử lý reduced motion: caller phải thêm.
AI Mode có class CSS riêng và admin dùng skeleton của Polaris; chỉ Classic import Skeleton của kit (xem Use instead).
Element chatty-skeleton ở mục Standard là chuẩn chatty-ui port theo; các mục theo surface mô tả component React đang chạy.
On this page
Use when / Avoid
Dùng khi biết kích thước nội dung cuối, ví dụ lưới GIF đang tải. Không dùng thay empty state hay chỉ báo AI đang xử lý. Surface khác dùng owner riêng của surface đó.
Use instead
Component
Use when
Skeleton
Classic: bone giữ chỗ cho lưới GIF khi loading.
chatty-skeleton
AI Mode: class CSS cho bone, không import Skeleton.
SkeletonBodyText
Admin · Knowledge files: dùng Polaris, không dùng Skeleton.
Live preview
Standard
Standard
LightDarkDesktopMobile
Element chatty-skeleton: circle, text, rect và bản tĩnh; bone aria-hidden.
Show codechatty-skeleton.element.jsWrap code linesCopy
Prototype (cùng skeleton.styles.js và ) là chuẩn: chatty-ui port 1:1 các file này, và chatty-ui/custom-elements.json sinh từ chính prototype. Chưa surface nào dùng element thật; các mục theo surface bên dưới mô tả React đang chạy.
Element
Element
Module
chatty-skeleton
@avada/chatty-ui/elements/skeleton.js
API
Kind
Name
Type
Default
Description
attribute
shape
rect, text, circle
'rect'
Hình bone: khối, dòng chữ hoặc tròn.
attribute
animation
pulse, none
'pulse'
pulse hoặc none; reduced motion luôn tắt pulse.
part
base
–
–
Khối bone.
css-property
--chatty-skeleton-width
–
–
Chiều rộng; mặc định full.
css-property
--chatty-skeleton-height
–
–
Chiều cao; text và circle có mặc định riêng.
css-property
--chatty-skeleton-color
–
–
Màu bone.
Classic
Standard
LightDarkDesktopMobile
Element chatty-skeleton: circle, text, rect và bản tĩnh; bone aria-hidden.
Show codechatty-skeleton.element.jsWrap code linesCopy