On this page

Typography

Type role, weight, tracking và điểm chuyển mobile đang chạy trên Classic, AI Mode và Admin.

Copy page as MarkdownRead Markdown ↗

Key rules

  • Classic: chọn role theo chức năng của chữ và đọc --chatty-type-<role>-size; không đặt font-size rời cho text của chat.
  • AI Mode: role mixin hoặc class chatty-type-<role>; mobile bật bằng is-mobile hoặc media query pointer thô.
  • Admin: role phát ra rem và có tracking riêng; mobile đổi bằng media query của admin.
  • Classic: weight storefront khác Polaris ở heading-large, heading-medium, heading-small, body-x-small; Admin giữ weight của bảng role.
  • Classic: storefront cộng $storefront-step; Admin dùng tuple gốc.
On this page

Where tokens live

Surface File Scope root Theme switch
Classic _type.scss gọi từ PopupBody.scss .Avada-Faqs_Popup Không đổi theo theme; class mobile gọi thêm mixin mobile
AI Mode _type.scss gọi từ foundation.scss .chatty-ai-mode Không đổi theo theme; class is-mobile và media query pointer thô gọi thêm mixin mobile
Admin _type.scss gọi từ _surface.scss .inbox-v2 Không đổi theo theme; media query của admin gọi thêm mixin mobile

How to apply

Surface API / class Example
Classic Sass mixin phát token @include type.tokens(storefront)
Classic Role phát CSS font-size: var(--chatty-type-body-large-size);
Classic Typography của chatty-ui <Typography variant="body1">
AI Mode Sass role mixin @include type.role(button-label)
AI Mode Sass mixin phát token @include type.tokens(storefront)
Admin Sass role mixin @include type.role(body-medium);
Admin Sass mixin phát token @include type.tokens(admin)

Element map

Element Surface Role/Token Light Dark
Typography h1 / h2 / h3 Classic display-small 24pxDerived(24px = type(display-small, desktop, size)) / 30pxDerived(30px = type(display-small, desktop, line)) desktop Same type role
Typography h4 / subtitle1 Classic heading-large 17pxDerived(17px = type(heading-large, desktop, size)) / 24pxDerived(24px = type(heading-large, desktop, line)) desktop Same type role
Typography h6 / subtitle2 Classic heading-medium 15pxDerived(15px = type(heading-medium, desktop, size)) / 22pxDerived(22px = type(heading-medium, desktop, line)) desktop Same type role
Typography body1 Classic body-large 17pxDerived(17px = type(body-large, desktop, size)) / 24pxDerived(24px = type(body-large, desktop, line)) desktop Same type role
Typography body2 Classic body-medium 15pxDerived(15px = type(body-medium, desktop, size)) / 22pxDerived(22px = type(body-medium, desktop, line)) desktop Same type role
Typography caption Classic body-small 14pxDerived(14px = type(body-small, desktop, size)) / 20pxDerived(20px = type(body-small, desktop, line)) desktop Same type role
Typography overline Classic heading-small 14pxDerived(14px = type(heading-small, desktop, size)) / 20pxDerived(20px = type(heading-small, desktop, line)) desktop; thêm chatty:uppercase Same type role
Typography button Classic button-label 14pxDerived(14px = type(button-label, desktop, size)) / 18pxDerived(18px = type(button-label, desktop, line)) desktop Same type role
Native action label AI Mode button-label 14pxDerived(14px = type(button-label, desktop, size)) / 18pxDerived(18px = type(button-label, desktop, line)) desktop Same type role
Message bubble text Admin body-medium 13pxDerived(13px = type(body-medium, admin, desktop, size)) / 20pxDerived(20px = type(body-medium, admin, desktop, line)) desktop Same type role

Tokens

Classic

Type roles

Role Desktop size (px) Desktop line-height (px) Mobile size (px) Mobile line-height (px) Weight Tracking
display-small 24pxDerived(24px = type(display-small, desktop, size)) 30pxDerived(30px = type(display-small, desktop, line)) 22pxDerived(22px = type(display-small, mobile, size)) 28pxDerived(28px = type(display-small, mobile, line)) 500 0
heading-large 17pxDerived(17px = type(heading-large, desktop, size)) 24pxDerived(24px = type(heading-large, desktop, line)) 19pxDerived(19px = type(heading-large, mobile, size)) 26pxDerived(26px = type(heading-large, mobile, line)) 600 0
heading-medium 15pxDerived(15px = type(heading-medium, desktop, size)) 22pxDerived(22px = type(heading-medium, desktop, line)) 17pxDerived(17px = type(heading-medium, mobile, size)) 24pxDerived(24px = type(heading-medium, mobile, line)) 600 0
heading-small 14pxDerived(14px = type(heading-small, desktop, size)) 20pxDerived(20px = type(heading-small, desktop, line)) 15pxDerived(15px = type(heading-small, mobile, size)) 22pxDerived(22px = type(heading-small, mobile, line)) 600 0
body-large 17pxDerived(17px = type(body-large, desktop, size)) 24pxDerived(24px = type(body-large, desktop, line)) 19pxDerived(19px = type(body-large, mobile, size)) 26pxDerived(26px = type(body-large, mobile, line)) 400 0
body-medium 15pxDerived(15px = type(body-medium, desktop, size)) 22pxDerived(22px = type(body-medium, desktop, line)) 17pxDerived(17px = type(body-medium, mobile, size)) 24pxDerived(24px = type(body-medium, mobile, line)) 400 0
body-small 14pxDerived(14px = type(body-small, desktop, size)) 20pxDerived(20px = type(body-small, desktop, line)) 15pxDerived(15px = type(body-small, mobile, size)) 22pxDerived(22px = type(body-small, mobile, line)) 400 0
body-x-small 13pxDerived(13px = type(body-x-small, desktop, size)) 16pxDerived(16px = type(body-x-small, desktop, line)) 14pxDerived(14px = type(body-x-small, mobile, size)) 18pxDerived(18px = type(body-x-small, mobile, line)) 600 0
button-label 14pxDerived(14px = type(button-label, desktop, size)) 18pxDerived(18px = type(button-label, desktop, line)) 17pxDerived(17px = type(button-label, mobile, size)) 24pxDerived(24px = type(button-label, mobile, line)) 500 0
chip-label 14pxDerived(14px = type(chip-label, desktop, size)) 18pxDerived(18px = type(chip-label, desktop, line)) 14pxDerived(14px = type(chip-label, mobile, size)) 18pxDerived(18px = type(chip-label, mobile, line)) 500 0
input-label 15pxDerived(15px = type(input-label, desktop, size)) 22pxDerived(22px = type(input-label, desktop, line)) 17pxDerived(17px = type(input-label, mobile, size)) 24pxDerived(24px = type(input-label, mobile, line)) 500 0
input-value 15pxDerived(15px = type(input-value, desktop, size)) 22pxDerived(22px = type(input-value, desktop, line)) 18pxDerived(18px = type(input-value, mobile, size)) 24pxDerived(24px = type(input-value, mobile, line)) 400 0

Breakpoints

Name Expression Mechanism
Classic mobile 899px JS mobileMaxWidth config; class mobile gọi mixin mobile

AI Mode

Type roles

Role Desktop size (px) Desktop line-height (px) Mobile size (px) Mobile line-height (px) Weight Tracking
display-small 24pxDerived(24px = type(display-small, desktop, size)) 30pxDerived(30px = type(display-small, desktop, line)) 22pxDerived(22px = type(display-small, mobile, size)) 28pxDerived(28px = type(display-small, mobile, line)) 500 0
heading-large 17pxDerived(17px = type(heading-large, desktop, size)) 24pxDerived(24px = type(heading-large, desktop, line)) 19pxDerived(19px = type(heading-large, mobile, size)) 26pxDerived(26px = type(heading-large, mobile, line)) 600 0
heading-medium 15pxDerived(15px = type(heading-medium, desktop, size)) 22pxDerived(22px = type(heading-medium, desktop, line)) 17pxDerived(17px = type(heading-medium, mobile, size)) 24pxDerived(24px = type(heading-medium, mobile, line)) 600 0
heading-small 14pxDerived(14px = type(heading-small, desktop, size)) 20pxDerived(20px = type(heading-small, desktop, line)) 15pxDerived(15px = type(heading-small, mobile, size)) 22pxDerived(22px = type(heading-small, mobile, line)) 600 0
body-large 17pxDerived(17px = type(body-large, desktop, size)) 24pxDerived(24px = type(body-large, desktop, line)) 19pxDerived(19px = type(body-large, mobile, size)) 26pxDerived(26px = type(body-large, mobile, line)) 400 0
body-medium 15pxDerived(15px = type(body-medium, desktop, size)) 22pxDerived(22px = type(body-medium, desktop, line)) 17pxDerived(17px = type(body-medium, mobile, size)) 24pxDerived(24px = type(body-medium, mobile, line)) 400 0
body-small 14pxDerived(14px = type(body-small, desktop, size)) 20pxDerived(20px = type(body-small, desktop, line)) 15pxDerived(15px = type(body-small, mobile, size)) 22pxDerived(22px = type(body-small, mobile, line)) 400 0
body-x-small 13pxDerived(13px = type(body-x-small, desktop, size)) 16pxDerived(16px = type(body-x-small, desktop, line)) 14pxDerived(14px = type(body-x-small, mobile, size)) 18pxDerived(18px = type(body-x-small, mobile, line)) 600 0
button-label 14pxDerived(14px = type(button-label, desktop, size)) 18pxDerived(18px = type(button-label, desktop, line)) 17pxDerived(17px = type(button-label, mobile, size)) 24pxDerived(24px = type(button-label, mobile, line)) 500 0
chip-label 14pxDerived(14px = type(chip-label, desktop, size)) 18pxDerived(18px = type(chip-label, desktop, line)) 14pxDerived(14px = type(chip-label, mobile, size)) 18pxDerived(18px = type(chip-label, mobile, line)) 500 0
input-label 15pxDerived(15px = type(input-label, desktop, size)) 22pxDerived(22px = type(input-label, desktop, line)) 17pxDerived(17px = type(input-label, mobile, size)) 24pxDerived(24px = type(input-label, mobile, line)) 500 0
input-value 15pxDerived(15px = type(input-value, desktop, size)) 22pxDerived(22px = type(input-value, desktop, line)) 18pxDerived(18px = type(input-value, mobile, size)) 24pxDerived(24px = type(input-value, mobile, line)) 400 0

Breakpoints

Name Expression Mechanism
AI Mode coarse pointer (hover: none) and (pointer: coarse) Media query gọi mixin mobile
AI Mode mobile class is-mobile Class gọi mixin mobile

Admin

Type roles

Role Desktop size (px) Desktop line-height (px) Mobile size (px) Mobile line-height (px) Weight Tracking
display-small 22pxDerived(22px = type(display-small, admin, desktop, size)) 28pxDerived(28px = type(display-small, admin, desktop, line)) 20pxDerived(20px = type(display-small, admin, mobile, size)) 26pxDerived(26px = type(display-small, admin, mobile, line)) 500 -0.02em
heading-large 15pxDerived(15px = type(heading-large, admin, desktop, size)) 22pxDerived(22px = type(heading-large, admin, desktop, line)) 17pxDerived(17px = type(heading-large, admin, mobile, size)) 24pxDerived(24px = type(heading-large, admin, mobile, line)) 500 -0.01em
heading-medium 13pxDerived(13px = type(heading-medium, admin, desktop, size)) 20pxDerived(20px = type(heading-medium, admin, desktop, line)) 15pxDerived(15px = type(heading-medium, admin, mobile, size)) 22pxDerived(22px = type(heading-medium, admin, mobile, line)) 500 -0.01em
heading-small 12pxDerived(12px = type(heading-small, admin, desktop, size)) 18pxDerived(18px = type(heading-small, admin, desktop, line)) 13pxDerived(13px = type(heading-small, admin, mobile, size)) 20pxDerived(20px = type(heading-small, admin, mobile, line)) 500 -0.005em
body-large 15pxDerived(15px = type(body-large, admin, desktop, size)) 22pxDerived(22px = type(body-large, admin, desktop, line)) 17pxDerived(17px = type(body-large, admin, mobile, size)) 24pxDerived(24px = type(body-large, admin, mobile, line)) 400 0
body-medium 13pxDerived(13px = type(body-medium, admin, desktop, size)) 20pxDerived(20px = type(body-medium, admin, desktop, line)) 15pxDerived(15px = type(body-medium, admin, mobile, size)) 22pxDerived(22px = type(body-medium, admin, mobile, line)) 400 -0.01em
body-small 12pxDerived(12px = type(body-small, admin, desktop, size)) 18pxDerived(18px = type(body-small, admin, desktop, line)) 13pxDerived(13px = type(body-small, admin, mobile, size)) 20pxDerived(20px = type(body-small, admin, mobile, line)) 400 -0.005em
body-x-small 11pxDerived(11px = type(body-x-small, admin, desktop, size)) 14pxDerived(14px = type(body-x-small, admin, desktop, line)) 12pxDerived(12px = type(body-x-small, admin, mobile, size)) 16pxDerived(16px = type(body-x-small, admin, mobile, line)) 400 0
button-label 12pxDerived(12px = type(button-label, admin, desktop, size)) 16pxDerived(16px = type(button-label, admin, desktop, line)) 15pxDerived(15px = type(button-label, admin, mobile, size)) 22pxDerived(22px = type(button-label, admin, mobile, line)) 500 0
chip-label 12pxDerived(12px = type(chip-label, admin, desktop, size)) 16pxDerived(16px = type(chip-label, admin, desktop, line)) 12pxDerived(12px = type(chip-label, admin, mobile, size)) 16pxDerived(16px = type(chip-label, admin, mobile, line)) 500 0
input-label 13pxDerived(13px = type(input-label, admin, desktop, size)) 20pxDerived(20px = type(input-label, admin, desktop, line)) 15pxDerived(15px = type(input-label, admin, mobile, size)) 22pxDerived(22px = type(input-label, admin, mobile, line)) 500 0
input-value 13pxDerived(13px = type(input-value, admin, desktop, size)) 20pxDerived(20px = type(input-value, admin, desktop, line)) 16pxDerived(16px = type(input-value, admin, mobile, size)) 22pxDerived(22px = type(input-value, admin, mobile, line)) 400 0

Breakpoints

Name Expression Mechanism
Admin mobile (max-width: 47.9975em) Biến type.$admin-mobile trong media query

Composed values

Element Surface Light Dark Fallback
Admin display-small desktop size / line Admin 1.375remDerived(1.375rem = type(display-small, admin, desktop, size)) / 1.75remDerived(1.75rem = type(display-small, admin, desktop, line)) Same type role Không khai báo
Admin heading-large desktop size / line Admin 0.9375remDerived(0.9375rem = type(heading-large, admin, desktop, size)) / 1.375remDerived(1.375rem = type(heading-large, admin, desktop, line)) Same type role Không khai báo
Admin heading-medium desktop size / line Admin 0.8125remDerived(0.8125rem = type(heading-medium, admin, desktop, size)) / 1.25remDerived(1.25rem = type(heading-medium, admin, desktop, line)) Same type role Không khai báo
Admin heading-small desktop size / line Admin 0.75remDerived(0.75rem = type(heading-small, admin, desktop, size)) / 1.125remDerived(1.125rem = type(heading-small, admin, desktop, line)) Same type role Không khai báo
Admin body-large desktop size / line Admin 0.9375remDerived(0.9375rem = type(body-large, admin, desktop, size)) / 1.375remDerived(1.375rem = type(body-large, admin, desktop, line)) Same type role Không khai báo
Admin body-medium desktop size / line Admin 0.8125remDerived(0.8125rem = type(body-medium, admin, desktop, size)) / 1.25remDerived(1.25rem = type(body-medium, admin, desktop, line)) Same type role Không khai báo
Admin body-small desktop size / line Admin 0.75remDerived(0.75rem = type(body-small, admin, desktop, size)) / 1.125remDerived(1.125rem = type(body-small, admin, desktop, line)) Same type role Không khai báo
Admin body-x-small desktop size / line Admin 0.6875remDerived(0.6875rem = type(body-x-small, admin, desktop, size)) / 0.875remDerived(0.875rem = type(body-x-small, admin, desktop, line)) Same type role Không khai báo
Admin button-label desktop size / line Admin 0.75remDerived(0.75rem = type(button-label, admin, desktop, size)) / 1remDerived(1rem = type(button-label, admin, desktop, line)) Same type role Không khai báo
Admin chip-label desktop size / line Admin 0.75remDerived(0.75rem = type(chip-label, admin, desktop, size)) / 1remDerived(1rem = type(chip-label, admin, desktop, line)) Same type role Không khai báo
Admin input-label desktop size / line Admin 0.8125remDerived(0.8125rem = type(input-label, admin, desktop, size)) / 1.25remDerived(1.25rem = type(input-label, admin, desktop, line)) Same type role Không khai báo
Admin input-value desktop size / line Admin 0.8125remDerived(0.8125rem = type(input-value, admin, desktop, size)) / 1.25remDerived(1.25rem = type(input-value, admin, desktop, line)) Same type role Không khai báo
Admin display-small mobile size / line Admin 1.25remDerived(1.25rem = type(display-small, admin, mobile, size)) / 1.625remDerived(1.625rem = type(display-small, admin, mobile, line)) Same type role Không khai báo
Admin heading-large mobile size / line Admin 1.0625remDerived(1.0625rem = type(heading-large, admin, mobile, size)) / 1.5remDerived(1.5rem = type(heading-large, admin, mobile, line)) Same type role Không khai báo
Admin heading-medium mobile size / line Admin 0.9375remDerived(0.9375rem = type(heading-medium, admin, mobile, size)) / 1.375remDerived(1.375rem = type(heading-medium, admin, mobile, line)) Same type role Không khai báo
Admin heading-small mobile size / line Admin 0.8125remDerived(0.8125rem = type(heading-small, admin, mobile, size)) / 1.25remDerived(1.25rem = type(heading-small, admin, mobile, line)) Same type role Không khai báo
Admin body-large mobile size / line Admin 1.0625remDerived(1.0625rem = type(body-large, admin, mobile, size)) / 1.5remDerived(1.5rem = type(body-large, admin, mobile, line)) Same type role Không khai báo
Admin body-medium mobile size / line Admin 0.9375remDerived(0.9375rem = type(body-medium, admin, mobile, size)) / 1.375remDerived(1.375rem = type(body-medium, admin, mobile, line)) Same type role Không khai báo
Admin body-small mobile size / line Admin 0.8125remDerived(0.8125rem = type(body-small, admin, mobile, size)) / 1.25remDerived(1.25rem = type(body-small, admin, mobile, line)) Same type role Không khai báo
Admin body-x-small mobile size / line Admin 0.75remDerived(0.75rem = type(body-x-small, admin, mobile, size)) / 1remDerived(1rem = type(body-x-small, admin, mobile, line)) Same type role Không khai báo
Admin button-label mobile size / line Admin 0.9375remDerived(0.9375rem = type(button-label, admin, mobile, size)) / 1.375remDerived(1.375rem = type(button-label, admin, mobile, line)) Same type role Không khai báo
Admin chip-label mobile size / line Admin 0.75remDerived(0.75rem = type(chip-label, admin, mobile, size)) / 1remDerived(1rem = type(chip-label, admin, mobile, line)) Same type role Không khai báo
Admin input-label mobile size / line Admin 0.9375remDerived(0.9375rem = type(input-label, admin, mobile, size)) / 1.375remDerived(1.375rem = type(input-label, admin, mobile, line)) Same type role Không khai báo
Admin input-value mobile size / line Admin 1remDerived(1rem = type(input-value, admin, mobile, size)) / 1.375remDerived(1.375rem = type(input-value, admin, mobile, line)) Same type role Không khai báo
Merchant font stack AI Mode var(--faqsFontFamily, -apple-system), BlinkMacSystemFont, SF Pro Display, SF Pro Text, system-ui, Segoe UI, Roboto, sans-serif Same type role Không khai báo
System font stack Classic -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif Same type role Không khai báo
LightDarkDesktopMobile

Mẫu từng role theo token Classic.

Show code
typography.jsxWrap code linesCopy
import React from 'react';
import {Typography} from '@avada/chatty-ui/components/typography.js';

const roleNames = ['display-small', 'heading-large', 'heading-medium', 'heading-small', 'body-large', 'body-medium', 'body-small', 'body-x-small', 'button-label', 'chip-label', 'input-label', 'input-value'];

const variants = {
  'display-small': 'h1',
  'heading-large': 'h4',
  'heading-medium': 'h6',
  'body-large': 'body1',
  'body-medium': 'body2',
  'body-small': 'caption',
  'button-label': 'button'
};

export function Roles({surface}) {
  return (
    <table className="role-list">
      <thead>
        <tr>
          <th>Role</th>
          <th>Live example</th>
        </tr>
      </thead>
      <tbody>
        {roleNames.map(name => (
          <tr className="role-row" key={name}>
            <td>
              <code>{name}</code>
            </td>
            <td>
              {surface === 'ai-mode' || !variants[name] ? (
                <span data-role={name} className={`chatty-type-${name}`}>
                  Chọn điều phù hợp với bạn
                </span>
              ) : (
                <Typography
                  component="span"
                  variant={variants[name]}
                  className={`chatty-type-${name}`}
                  data-role={name}
                >
                  Chọn điều phù hợp với bạn
                </Typography>
              )}
            </td>
          </tr>
        ))}
      </tbody>
    </table>
  );
}
LightDarkDesktopMobile

Mẫu từng role theo token AI Mode.

Show code
typography.jsxWrap code linesCopy
import React from 'react';
import {Typography} from '@avada/chatty-ui/components/typography.js';

const roleNames = ['display-small', 'heading-large', 'heading-medium', 'heading-small', 'body-large', 'body-medium', 'body-small', 'body-x-small', 'button-label', 'chip-label', 'input-label', 'input-value'];

const variants = {
  'display-small': 'h1',
  'heading-large': 'h4',
  'heading-medium': 'h6',
  'body-large': 'body1',
  'body-medium': 'body2',
  'body-small': 'caption',
  'button-label': 'button'
};

export function Roles({surface}) {
  return (
    <table className="role-list">
      <thead>
        <tr>
          <th>Role</th>
          <th>Live example</th>
        </tr>
      </thead>
      <tbody>
        {roleNames.map(name => (
          <tr className="role-row" key={name}>
            <td>
              <code>{name}</code>
            </td>
            <td>
              {surface === 'ai-mode' || !variants[name] ? (
                <span data-role={name} className={`chatty-type-${name}`}>
                  Chọn điều phù hợp với bạn
                </span>
              ) : (
                <Typography
                  component="span"
                  variant={variants[name]}
                  className={`chatty-type-${name}`}
                  data-role={name}
                >
                  Chọn điều phù hợp với bạn
                </Typography>
              )}
            </td>
          </tr>
        ))}
      </tbody>
    </table>
  );
}
LightDarkDesktopMobile

Mẫu từng role theo token Admin (rem).

Show code
typography.jsxWrap code linesCopy
import React from 'react';
import {Typography} from '@avada/chatty-ui/components/typography.js';

const roleNames = ['display-small', 'heading-large', 'heading-medium', 'heading-small', 'body-large', 'body-medium', 'body-small', 'body-x-small', 'button-label', 'chip-label', 'input-label', 'input-value'];

const variants = {
  'display-small': 'h1',
  'heading-large': 'h4',
  'heading-medium': 'h6',
  'body-large': 'body1',
  'body-medium': 'body2',
  'body-small': 'caption',
  'button-label': 'button'
};

export function Roles({surface}) {
  return (
    <table className="role-list">
      <thead>
        <tr>
          <th>Role</th>
          <th>Live example</th>
        </tr>
      </thead>
      <tbody>
        {roleNames.map(name => (
          <tr className="role-row" key={name}>
            <td>
              <code>{name}</code>
            </td>
            <td>
              {surface === 'ai-mode' || !variants[name] ? (
                <span data-role={name} className={`chatty-type-${name}`}>
                  Chọn điều phù hợp với bạn
                </span>
              ) : (
                <Typography
                  component="span"
                  variant={variants[name]}
                  className={`chatty-type-${name}`}
                  data-role={name}
                >
                  Chọn điều phù hợp với bạn
                </Typography>
              )}
            </td>
          </tr>
        ))}
      </tbody>
    </table>
  );
}

Copy-paste export

Classic

.Avada-Faqs_Popup {
  --chatty-type-display-small-size: 24px;
  --chatty-type-display-small-line: 30px;
  --chatty-type-display-small-weight: 500;
  --chatty-type-display-small-tracking: 0;
  --chatty-type-heading-large-size: 17px;
  --chatty-type-heading-large-line: 24px;
  --chatty-type-heading-large-weight: 600;
  --chatty-type-heading-large-tracking: 0;
  --chatty-type-heading-medium-size: 15px;
  --chatty-type-heading-medium-line: 22px;
  --chatty-type-heading-medium-weight: 600;
  --chatty-type-heading-medium-tracking: 0;
  --chatty-type-heading-small-size: 14px;
  --chatty-type-heading-small-line: 20px;
  --chatty-type-heading-small-weight: 600;
  --chatty-type-heading-small-tracking: 0;
  --chatty-type-body-large-size: 17px;
  --chatty-type-body-large-line: 24px;
  --chatty-type-body-large-weight: 400;
  --chatty-type-body-large-tracking: 0;
  --chatty-type-body-medium-size: 15px;
  --chatty-type-body-medium-line: 22px;
  --chatty-type-body-medium-weight: 400;
  --chatty-type-body-medium-tracking: 0;
  --chatty-type-body-small-size: 14px;
  --chatty-type-body-small-line: 20px;
  --chatty-type-body-small-weight: 400;
  --chatty-type-body-small-tracking: 0;
  --chatty-type-body-x-small-size: 13px;
  --chatty-type-body-x-small-line: 16px;
  --chatty-type-body-x-small-weight: 600;
  --chatty-type-body-x-small-tracking: 0;
  --chatty-type-button-label-size: 14px;
  --chatty-type-button-label-line: 18px;
  --chatty-type-button-label-weight: 500;
  --chatty-type-button-label-tracking: 0;
  --chatty-type-chip-label-size: 14px;
  --chatty-type-chip-label-line: 18px;
  --chatty-type-chip-label-weight: 500;
  --chatty-type-chip-label-tracking: 0;
  --chatty-type-input-label-size: 15px;
  --chatty-type-input-label-line: 22px;
  --chatty-type-input-label-weight: 500;
  --chatty-type-input-label-tracking: 0;
  --chatty-type-input-value-size: 15px;
  --chatty-type-input-value-line: 22px;
  --chatty-type-input-value-weight: 400;
  --chatty-type-input-value-tracking: 0;
}
.Avada-Faqs_Popup.mobile {
  --chatty-type-display-small-size: 22px;
  --chatty-type-display-small-line: 28px;
  --chatty-type-heading-large-size: 19px;
  --chatty-type-heading-large-line: 26px;
  --chatty-type-heading-medium-size: 17px;
  --chatty-type-heading-medium-line: 24px;
  --chatty-type-heading-small-size: 15px;
  --chatty-type-heading-small-line: 22px;
  --chatty-type-body-large-size: 19px;
  --chatty-type-body-large-line: 26px;
  --chatty-type-body-medium-size: 17px;
  --chatty-type-body-medium-line: 24px;
  --chatty-type-body-small-size: 15px;
  --chatty-type-body-small-line: 22px;
  --chatty-type-body-x-small-size: 14px;
  --chatty-type-body-x-small-line: 18px;
  --chatty-type-button-label-size: 17px;
  --chatty-type-button-label-line: 24px;
  --chatty-type-chip-label-size: 14px;
  --chatty-type-chip-label-line: 18px;
  --chatty-type-input-label-size: 17px;
  --chatty-type-input-label-line: 24px;
  --chatty-type-input-value-size: 18px;
  --chatty-type-input-value-line: 24px;
}

AI Mode

.chatty-ai-mode {
  --chatty-type-display-small-size: 24px;
  --chatty-type-display-small-line: 30px;
  --chatty-type-display-small-weight: 500;
  --chatty-type-display-small-tracking: 0;
  --chatty-type-heading-large-size: 17px;
  --chatty-type-heading-large-line: 24px;
  --chatty-type-heading-large-weight: 600;
  --chatty-type-heading-large-tracking: 0;
  --chatty-type-heading-medium-size: 15px;
  --chatty-type-heading-medium-line: 22px;
  --chatty-type-heading-medium-weight: 600;
  --chatty-type-heading-medium-tracking: 0;
  --chatty-type-heading-small-size: 14px;
  --chatty-type-heading-small-line: 20px;
  --chatty-type-heading-small-weight: 600;
  --chatty-type-heading-small-tracking: 0;
  --chatty-type-body-large-size: 17px;
  --chatty-type-body-large-line: 24px;
  --chatty-type-body-large-weight: 400;
  --chatty-type-body-large-tracking: 0;
  --chatty-type-body-medium-size: 15px;
  --chatty-type-body-medium-line: 22px;
  --chatty-type-body-medium-weight: 400;
  --chatty-type-body-medium-tracking: 0;
  --chatty-type-body-small-size: 14px;
  --chatty-type-body-small-line: 20px;
  --chatty-type-body-small-weight: 400;
  --chatty-type-body-small-tracking: 0;
  --chatty-type-body-x-small-size: 13px;
  --chatty-type-body-x-small-line: 16px;
  --chatty-type-body-x-small-weight: 600;
  --chatty-type-body-x-small-tracking: 0;
  --chatty-type-button-label-size: 14px;
  --chatty-type-button-label-line: 18px;
  --chatty-type-button-label-weight: 500;
  --chatty-type-button-label-tracking: 0;
  --chatty-type-chip-label-size: 14px;
  --chatty-type-chip-label-line: 18px;
  --chatty-type-chip-label-weight: 500;
  --chatty-type-chip-label-tracking: 0;
  --chatty-type-input-label-size: 15px;
  --chatty-type-input-label-line: 22px;
  --chatty-type-input-label-weight: 500;
  --chatty-type-input-label-tracking: 0;
  --chatty-type-input-value-size: 15px;
  --chatty-type-input-value-line: 22px;
  --chatty-type-input-value-weight: 400;
  --chatty-type-input-value-tracking: 0;
}
.chatty-ai-mode.is-mobile {
  --chatty-type-display-small-size: 22px;
  --chatty-type-display-small-line: 28px;
  --chatty-type-heading-large-size: 19px;
  --chatty-type-heading-large-line: 26px;
  --chatty-type-heading-medium-size: 17px;
  --chatty-type-heading-medium-line: 24px;
  --chatty-type-heading-small-size: 15px;
  --chatty-type-heading-small-line: 22px;
  --chatty-type-body-large-size: 19px;
  --chatty-type-body-large-line: 26px;
  --chatty-type-body-medium-size: 17px;
  --chatty-type-body-medium-line: 24px;
  --chatty-type-body-small-size: 15px;
  --chatty-type-body-small-line: 22px;
  --chatty-type-body-x-small-size: 14px;
  --chatty-type-body-x-small-line: 18px;
  --chatty-type-button-label-size: 17px;
  --chatty-type-button-label-line: 24px;
  --chatty-type-chip-label-size: 14px;
  --chatty-type-chip-label-line: 18px;
  --chatty-type-input-label-size: 17px;
  --chatty-type-input-label-line: 24px;
  --chatty-type-input-value-size: 18px;
  --chatty-type-input-value-line: 24px;
}

Admin

.inbox-v2 {
  --chatty-type-display-small-size: 1.375rem;
  --chatty-type-display-small-line: 1.75rem;
  --chatty-type-display-small-weight: 500;
  --chatty-type-display-small-tracking: -0.02em;
  --chatty-type-heading-large-size: 0.9375rem;
  --chatty-type-heading-large-line: 1.375rem;
  --chatty-type-heading-large-weight: 500;
  --chatty-type-heading-large-tracking: -0.01em;
  --chatty-type-heading-medium-size: 0.8125rem;
  --chatty-type-heading-medium-line: 1.25rem;
  --chatty-type-heading-medium-weight: 500;
  --chatty-type-heading-medium-tracking: -0.01em;
  --chatty-type-heading-small-size: 0.75rem;
  --chatty-type-heading-small-line: 1.125rem;
  --chatty-type-heading-small-weight: 500;
  --chatty-type-heading-small-tracking: -0.005em;
  --chatty-type-body-large-size: 0.9375rem;
  --chatty-type-body-large-line: 1.375rem;
  --chatty-type-body-large-weight: 400;
  --chatty-type-body-large-tracking: 0;
  --chatty-type-body-medium-size: 0.8125rem;
  --chatty-type-body-medium-line: 1.25rem;
  --chatty-type-body-medium-weight: 400;
  --chatty-type-body-medium-tracking: -0.01em;
  --chatty-type-body-small-size: 0.75rem;
  --chatty-type-body-small-line: 1.125rem;
  --chatty-type-body-small-weight: 400;
  --chatty-type-body-small-tracking: -0.005em;
  --chatty-type-body-x-small-size: 0.6875rem;
  --chatty-type-body-x-small-line: 0.875rem;
  --chatty-type-body-x-small-weight: 400;
  --chatty-type-body-x-small-tracking: 0;
  --chatty-type-button-label-size: 0.75rem;
  --chatty-type-button-label-line: 1rem;
  --chatty-type-button-label-weight: 500;
  --chatty-type-button-label-tracking: 0;
  --chatty-type-chip-label-size: 0.75rem;
  --chatty-type-chip-label-line: 1rem;
  --chatty-type-chip-label-weight: 500;
  --chatty-type-chip-label-tracking: 0;
  --chatty-type-input-label-size: 0.8125rem;
  --chatty-type-input-label-line: 1.25rem;
  --chatty-type-input-label-weight: 500;
  --chatty-type-input-label-tracking: 0;
  --chatty-type-input-value-size: 0.8125rem;
  --chatty-type-input-value-line: 1.25rem;
  --chatty-type-input-value-weight: 400;
  --chatty-type-input-value-tracking: 0;
}
@media (max-width: 47.9975em) {
  .inbox-v2 {
    --chatty-type-display-small-size: 1.25rem;
    --chatty-type-display-small-line: 1.625rem;
    --chatty-type-heading-large-size: 1.0625rem;
    --chatty-type-heading-large-line: 1.5rem;
    --chatty-type-heading-medium-size: 0.9375rem;
    --chatty-type-heading-medium-line: 1.375rem;
    --chatty-type-heading-small-size: 0.8125rem;
    --chatty-type-heading-small-line: 1.25rem;
    --chatty-type-body-large-size: 1.0625rem;
    --chatty-type-body-large-line: 1.5rem;
    --chatty-type-body-medium-size: 0.9375rem;
    --chatty-type-body-medium-line: 1.375rem;
    --chatty-type-body-small-size: 0.8125rem;
    --chatty-type-body-small-line: 1.25rem;
    --chatty-type-body-x-small-size: 0.75rem;
    --chatty-type-body-x-small-line: 1rem;
    --chatty-type-button-label-size: 0.9375rem;
    --chatty-type-button-label-line: 1.375rem;
    --chatty-type-chip-label-size: 0.75rem;
    --chatty-type-chip-label-line: 1rem;
    --chatty-type-input-label-size: 0.9375rem;
    --chatty-type-input-label-line: 1.375rem;
    --chatty-type-input-value-size: 1rem;
    --chatty-type-input-value-line: 1.375rem;
  }
}

Contrast matrix

Surface Pair Light ratio Dark ratio
Classic --chatty-muted-foreground / --chatty-background 4.76:1Measured(#64748b / #ffffff = 4.76:1) Merchant-defined: --faqsTextColorSecondary / --faqsBgColor
AI Mode --chatty-color-text-secondary / --chatty-color-bg-surface 6.19:1Measured(#616161 / #ffffff = 6.19:1) 10.42:1Measured(rgba(255, 255, 255, 0.74) / #131215 = 10.42:1)
Admin --chatty-color-text-link / --chatty-color-bg-surface-secondary 5.70:1Measured(#005bd3 / #f7f7f7 = 5.70:1) No Dark skin

Target

LightDarkDesktopMobile

Target: mẫu giá trị Inbox được duyệt; không phải implementation production.

Show code
inbox-admin-rules.jsxWrap code linesCopy
import React from 'react';
const radii = {"container": "20px", "dialog": "20px", "popover": "12px", "control": "10px", "element": "8px", "tag": "6px", "checkbox": "4px", "avatar": "clamp(6px, 30%, 12px)", "action": "9999px", "chat-control": ".5rem", "option-item": ".5rem", "kbd": ".25rem"};
const themes = {"light": {"--chatty-color-bg": "#fff", "--chatty-color-bg-fill-caution-secondary": "oklch(.9167 .1785 98.00)", "--chatty-color-bg-fill-critical": "oklch(.9470 .0300 20.50)", "--chatty-color-bg-fill-info-secondary": "oklch(.8637 .1018 216.95)", "--chatty-color-bg-fill-inverse": "#1b1b1b", "--chatty-color-bg-fill-secondary": "#ebebeb", "--chatty-color-bg-fill-success": "oklch(.9672 .0599 131.73)", "--chatty-color-bg-fill-success-secondary": "oklch(.9053 .1942 133.49)", "--chatty-color-bg-fill-tertiary": "#ddd", "--chatty-color-bg-fill-tertiary-hover": "#d0d0d0", "--chatty-color-bg-surface": "#fff", "--chatty-color-bg-surface-critical": "oklch(.9470 .0300 20.50)", "--chatty-color-bg-surface-secondary": "#f7f7f7", "--chatty-color-bg-surface-secondary-selected": "#ebebeb", "--chatty-color-bg-surface-success": "oklch(.9672 .0599 131.73)", "--chatty-color-bg-surface-tertiary": "#f2f2f2", "--chatty-color-bg-surface-warning": "oklch(.9557 .0350 67.45)", "--chatty-color-border": "rgba(221,221,221,1)", "--chatty-color-border-secondary": "rgba(242,242,242,1)", "--chatty-color-border-tertiary": "rgba(192,192,192,1)", "--chatty-color-border-warning": "oklch(.9316 .0545 67.18)", "--chatty-color-icon-secondary": "#606060", "--chatty-color-text": "#101010", "--chatty-color-text-brand-on-accent": "#fff", "--chatty-color-text-caution": "oklch(.2708 .0638 90.28)", "--chatty-color-text-critical": "oklch(.2121 .0942 30.90)", "--chatty-color-text-info": "oklch(.2715 .0576 221.37)", "--chatty-color-text-link": "oklch(.4840 .2413 262.80)", "--chatty-color-text-link-inverse": "oklch(.7340 .1449 264.63)", "--chatty-color-text-on-accent": "#fff", "--chatty-color-text-secondary": "rgba(74,74,74,1)", "--chatty-color-text-success": "oklch(.2334 .0796 134.14)", "--chatty-color-text-warning": "oklch(.2475 .0726 51.49)"}, "dark": {"--chatty-color-bg": "#121212", "--chatty-color-bg-fill-caution-secondary": "#4f4700", "--chatty-color-bg-fill-critical": "#2f040b", "--chatty-color-bg-fill-info-secondary": "#003a5a", "--chatty-color-bg-fill-inverse": "#303030", "--chatty-color-bg-fill-secondary": "#373737", "--chatty-color-bg-fill-success": "#014b40", "--chatty-color-bg-fill-success-secondary": "#014b40", "--chatty-color-bg-fill-tertiary": "#414141", "--chatty-color-bg-fill-tertiary-hover": "#585858", "--chatty-color-bg-surface": "#1a1a1a", "--chatty-color-bg-surface-critical": "#5f0716", "--chatty-color-bg-surface-secondary": "#282828", "--chatty-color-bg-surface-secondary-selected": "#373737", "--chatty-color-bg-surface-success": "#073630", "--chatty-color-bg-surface-tertiary": "#2f2f2f", "--chatty-color-bg-surface-warning": "#412d00", "--chatty-color-border": "#ffffff17", "--chatty-color-border-secondary": "#ffffff0f", "--chatty-color-border-tertiary": "#ffffff2e", "--chatty-color-border-warning": "#956f00", "--chatty-color-icon-secondary": "#aaa", "--chatty-color-text": "#eee", "--chatty-color-text-brand-on-accent": "#121212", "--chatty-color-text-caution": "#ffeb78", "--chatty-color-text-critical": "#f78086", "--chatty-color-text-info": "#a8d8ff", "--chatty-color-text-link": "#c5d0ff", "--chatty-color-text-link-inverse": "#c5d0ff", "--chatty-color-text-on-accent": "#121212", "--chatty-color-text-secondary": "#aaa", "--chatty-color-text-success": "#2ced83", "--chatty-color-text-warning": "#ffc879"}};
const frameStyle = {
 ...themes.light,
 ...Object.fromEntries(Object.entries(radii).map(([role,value])=>['--chatty-radius-'+role,value])),
 '--chatty-type-family':'ShopifyInter, ui-sans-serif, system-ui, sans-serif',
 '--chatty-type-weight-regular':400,'--chatty-type-weight-medium':500,'--chatty-type-weight-semibold':600,
 '--chatty-type-body-medium-size':'13px','--chatty-type-body-medium-line':'20px',
 '--chatty-type-button-label-size':'12px','--chatty-type-button-label-line':'16px',
 '--chatty-type-badge-label-size':'12px','--chatty-type-badge-label-line':'18px',
 fontFamily:'var(--chatty-type-family)',fontSize:'var(--chatty-type-body-medium-size)',lineHeight:'var(--chatty-type-body-medium-line)',fontWeight:'var(--chatty-type-weight-regular)',
 color:'var(--chatty-color-text)',background:'var(--chatty-color-bg-surface)',padding:16
};
const box = {border:'1px solid #888',background:'#f7f7f7',padding:12,color:'#101010',font:'inherit'};
function Target({children}) { return <div data-inbox-target style={frameStyle}><link rel="stylesheet" href="https://cdn.shopify.com/static/fonts/shopifyinter/v0/styles.css"/><p style={{marginTop:0}}>Target · design fixture · phase 1b chưa ship</p>{children}</div>; }
function RadiusSample({role,value}) {
 const style={...box,borderRadius:`var(--chatty-radius-${role})`};
 if(role==='checkbox')return <input aria-label="Checkbox radius sample" type="checkbox" style={{...style,appearance:'none',width:24,height:24,padding:0}}/>;
 if(role==='avatar')return <span role="img" aria-label="Avatar initials" style={{...style,width:36,height:36,padding:0,display:'grid',placeItems:'center'}}>AB</span>;
 if(role==='tag')return <span style={{...style,padding:'0 8px',display:'inline-block'}}>Status</span>;
 if(role==='kbd')return <kbd style={{...style,padding:'0 6px'}}>A</kbd>;
 if(['action','control','chat-control','option-item'].includes(role))return <button type="button" style={style}>Action</button>;
 if(role==='dialog')return <dialog open aria-label="Dialog radius sample" style={{...style,position:'static',margin:0}}>Dialog</dialog>;
 return <section aria-label={`${role} radius sample`} style={style}>{role}</section>;
}
export function Type() {
 return <Target><p>ShopifyInter · stylesheet CDN Shopify · cùng token standalone/embedded</p><div style={{'--chatty-type-weight-regular':400,'--chatty-type-weight-medium':500,'--chatty-type-weight-semibold':600,'--chatty-type-family':'ShopifyInter, ui-sans-serif, system-ui, sans-serif'}}>{['regular','medium','semibold'].map((role,i)=><p data-weight={role} key={role} style={{fontWeight:`var(--chatty-type-weight-${role})`,fontFamily:'var(--chatty-type-family)'}}>{role} · {[400,500,600][i]} · Inbox text</p>)}<span data-badge-label style={{...box,display:'inline-flex',height:20,padding:'0 6px',fontSize:'var(--chatty-type-badge-label-size)',lineHeight:'var(--chatty-type-badge-label-line)',fontWeight:'var(--chatty-type-weight-medium)',borderRadius:'var(--chatty-radius-tag)'}}>badge-label · 12/18 · 500</span><p style={{fontSize:11,lineHeight:'14px'}}>body-x-small · 11/14 · chỉ badge đếm số: 3</p></div></Target>;
}
LightDarkDesktopMobile

Target: kích thước admin và nút primary Light/Dark.

Show code
inbox-admin-rules.jsxWrap code linesCopy
import React from 'react';
const radii = {"container": "20px", "dialog": "20px", "popover": "12px", "control": "10px", "element": "8px", "tag": "6px", "checkbox": "4px", "avatar": "clamp(6px, 30%, 12px)", "action": "9999px", "chat-control": ".5rem", "option-item": ".5rem", "kbd": ".25rem"};
const themes = {"light": {"--chatty-color-bg": "#fff", "--chatty-color-bg-fill-caution-secondary": "oklch(.9167 .1785 98.00)", "--chatty-color-bg-fill-critical": "oklch(.9470 .0300 20.50)", "--chatty-color-bg-fill-info-secondary": "oklch(.8637 .1018 216.95)", "--chatty-color-bg-fill-inverse": "#1b1b1b", "--chatty-color-bg-fill-secondary": "#ebebeb", "--chatty-color-bg-fill-success": "oklch(.9672 .0599 131.73)", "--chatty-color-bg-fill-success-secondary": "oklch(.9053 .1942 133.49)", "--chatty-color-bg-fill-tertiary": "#ddd", "--chatty-color-bg-fill-tertiary-hover": "#d0d0d0", "--chatty-color-bg-surface": "#fff", "--chatty-color-bg-surface-critical": "oklch(.9470 .0300 20.50)", "--chatty-color-bg-surface-secondary": "#f7f7f7", "--chatty-color-bg-surface-secondary-selected": "#ebebeb", "--chatty-color-bg-surface-success": "oklch(.9672 .0599 131.73)", "--chatty-color-bg-surface-tertiary": "#f2f2f2", "--chatty-color-bg-surface-warning": "oklch(.9557 .0350 67.45)", "--chatty-color-border": "rgba(221,221,221,1)", "--chatty-color-border-secondary": "rgba(242,242,242,1)", "--chatty-color-border-tertiary": "rgba(192,192,192,1)", "--chatty-color-border-warning": "oklch(.9316 .0545 67.18)", "--chatty-color-icon-secondary": "#606060", "--chatty-color-text": "#101010", "--chatty-color-text-brand-on-accent": "#fff", "--chatty-color-text-caution": "oklch(.2708 .0638 90.28)", "--chatty-color-text-critical": "oklch(.2121 .0942 30.90)", "--chatty-color-text-info": "oklch(.2715 .0576 221.37)", "--chatty-color-text-link": "oklch(.4840 .2413 262.80)", "--chatty-color-text-link-inverse": "oklch(.7340 .1449 264.63)", "--chatty-color-text-on-accent": "#fff", "--chatty-color-text-secondary": "rgba(74,74,74,1)", "--chatty-color-text-success": "oklch(.2334 .0796 134.14)", "--chatty-color-text-warning": "oklch(.2475 .0726 51.49)"}, "dark": {"--chatty-color-bg": "#121212", "--chatty-color-bg-fill-caution-secondary": "#4f4700", "--chatty-color-bg-fill-critical": "#2f040b", "--chatty-color-bg-fill-info-secondary": "#003a5a", "--chatty-color-bg-fill-inverse": "#303030", "--chatty-color-bg-fill-secondary": "#373737", "--chatty-color-bg-fill-success": "#014b40", "--chatty-color-bg-fill-success-secondary": "#014b40", "--chatty-color-bg-fill-tertiary": "#414141", "--chatty-color-bg-fill-tertiary-hover": "#585858", "--chatty-color-bg-surface": "#1a1a1a", "--chatty-color-bg-surface-critical": "#5f0716", "--chatty-color-bg-surface-secondary": "#282828", "--chatty-color-bg-surface-secondary-selected": "#373737", "--chatty-color-bg-surface-success": "#073630", "--chatty-color-bg-surface-tertiary": "#2f2f2f", "--chatty-color-bg-surface-warning": "#412d00", "--chatty-color-border": "#ffffff17", "--chatty-color-border-secondary": "#ffffff0f", "--chatty-color-border-tertiary": "#ffffff2e", "--chatty-color-border-warning": "#956f00", "--chatty-color-icon-secondary": "#aaa", "--chatty-color-text": "#eee", "--chatty-color-text-brand-on-accent": "#121212", "--chatty-color-text-caution": "#ffeb78", "--chatty-color-text-critical": "#f78086", "--chatty-color-text-info": "#a8d8ff", "--chatty-color-text-link": "#c5d0ff", "--chatty-color-text-link-inverse": "#c5d0ff", "--chatty-color-text-on-accent": "#121212", "--chatty-color-text-secondary": "#aaa", "--chatty-color-text-success": "#2ced83", "--chatty-color-text-warning": "#ffc879"}};
const frameStyle = {
 ...themes.light,
 ...Object.fromEntries(Object.entries(radii).map(([role,value])=>['--chatty-radius-'+role,value])),
 '--chatty-type-family':'ShopifyInter, ui-sans-serif, system-ui, sans-serif',
 '--chatty-type-weight-regular':400,'--chatty-type-weight-medium':500,'--chatty-type-weight-semibold':600,
 '--chatty-type-body-medium-size':'13px','--chatty-type-body-medium-line':'20px',
 '--chatty-type-button-label-size':'12px','--chatty-type-button-label-line':'16px',
 '--chatty-type-badge-label-size':'12px','--chatty-type-badge-label-line':'18px',
 fontFamily:'var(--chatty-type-family)',fontSize:'var(--chatty-type-body-medium-size)',lineHeight:'var(--chatty-type-body-medium-line)',fontWeight:'var(--chatty-type-weight-regular)',
 color:'var(--chatty-color-text)',background:'var(--chatty-color-bg-surface)',padding:16
};
const box = {border:'1px solid #888',background:'#f7f7f7',padding:12,color:'#101010',font:'inherit'};
function Target({children}) { return <div data-inbox-target style={frameStyle}><link rel="stylesheet" href="https://cdn.shopify.com/static/fonts/shopifyinter/v0/styles.css"/><p style={{marginTop:0}}>Target · design fixture · phase 1b chưa ship</p>{children}</div>; }
function RadiusSample({role,value}) {
 const style={...box,borderRadius:`var(--chatty-radius-${role})`};
 if(role==='checkbox')return <input aria-label="Checkbox radius sample" type="checkbox" style={{...style,appearance:'none',width:24,height:24,padding:0}}/>;
 if(role==='avatar')return <span role="img" aria-label="Avatar initials" style={{...style,width:36,height:36,padding:0,display:'grid',placeItems:'center'}}>AB</span>;
 if(role==='tag')return <span style={{...style,padding:'0 8px',display:'inline-block'}}>Status</span>;
 if(role==='kbd')return <kbd style={{...style,padding:'0 6px'}}>A</kbd>;
 if(['action','control','chat-control','option-item'].includes(role))return <button type="button" style={style}>Action</button>;
 if(role==='dialog')return <dialog open aria-label="Dialog radius sample" style={{...style,position:'static',margin:0}}>Dialog</dialog>;
 return <section aria-label={`${role} radius sample`} style={style}>{role}</section>;
}
export function Buttons() {
 return <Target><div style={{display:'flex',gap:16,flexWrap:'wrap'}}>{['light','dark'].map(theme=><div key={theme} data-primary-theme={theme} style={{padding:16,background:theme==='dark'?'#1a1a1a':'#fff',color:theme==='dark'?'#eee':'#101010','--chatty-color-action-primary-bg':theme==='dark'?'#fcfcfc':'#101010','--chatty-color-action-primary-fg':theme==='dark'?'#121212':'#fff'}}><p>{theme} · Target</p><button data-admin-primary type="button" style={{font:'var(--chatty-type-weight-medium) var(--chatty-type-button-label-size)/var(--chatty-type-button-label-line) var(--chatty-type-family)',height:28,padding:'0 12px',borderRadius:'var(--chatty-radius-action)',border:0,background:'var(--chatty-color-action-primary-bg)',color:'var(--chatty-color-action-primary-fg)'}}>Assign to me <kbd style={{font:'inherit',borderRadius:'var(--chatty-radius-kbd)'}}>A</kbd></button><span data-admin-badge style={{display:'inline-flex',height:20,alignItems:'center',marginInlineStart:8,padding:'0 6px',fontSize:'var(--chatty-type-badge-label-size)',lineHeight:'var(--chatty-type-badge-label-line)',fontWeight:'var(--chatty-type-weight-medium)',borderRadius:'var(--chatty-radius-tag)',border:'1px solid currentColor'}}>Status</span></div>)}</div><p>BFS 4.1.1: nút chính đen/trắng; màu brand không đạt điều kiện. Giá trị 2.0, component chatty-ui.</p></Target>;
}