Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
67ec848
chore: Explore new box component variant for visual accent
at-susie Jun 23, 2026
95d865e
chore: Update example page
at-susie Jun 24, 2026
8811a03
chore: Tokenize accent colors
at-susie Jun 29, 2026
8c847bb
chore: Fix accent color inheritance in Box component
at-susie Jun 29, 2026
f5c4f62
chore: Add accentShape prop for accent variant styling
at-susie Jun 30, 2026
3e1d9ea
chore: Update snapshots
at-susie Jul 1, 2026
47030b0
chore: Update styles for visual accent
at-susie Jul 1, 2026
b5fafda
Merge remote-tracking branch 'origin/main' into onetheme/box-accent
at-susie Jul 2, 2026
1c70c8d
chore: Add visualAccent prop for styled accent styling
at-susie Jul 3, 2026
58d3e77
chore: Update snapshots
at-susie Jul 3, 2026
f4c2999
chore: Update specificity and change file name
at-susie Jul 3, 2026
3af1c21
chore: Update accent color to have accessible colors
at-susie Jul 3, 2026
8a2b822
chore: Update snapshots and description on interface
at-susie Jul 3, 2026
19b2037
chore: Update background colors for marker
at-susie Jul 5, 2026
b8b000b
chore: Add info 700 to reference token
at-susie Jul 6, 2026
e29ce22
chore: Add `awsuiSystem one-theme` tag
at-susie Jul 7, 2026
e238584
chore: Update size-limit
at-susie Jul 8, 2026
c48bed2
chore: Update styles for visualAccent
at-susie Jul 9, 2026
d079ddc
chore: Update snapshots
at-susie Jul 9, 2026
1f5db4c
Merge branch 'main' into onetheme/box-accent
at-susie Jul 9, 2026
3b2b735
Merge branch 'main' into onetheme/box-accent
at-susie Jul 9, 2026
89e5ded
chore: Increase size limit
at-susie Jul 10, 2026
1f3e361
chore Update visualAccent styling and remove 'n' borderRadius option
at-susie Jul 10, 2026
b9b6c33
chore: Refactor visual-accent styles with dynamic token lookup
at-susie Jul 10, 2026
a19c9a9
Merge branch 'main' into onetheme/box-accent
at-susie Jul 10, 2026
64bba60
chore: Update test utils wrapper
at-susie Jul 10, 2026
6786dc0
chore: Update test-utils-wrappers snapshot
at-susie Jul 10, 2026
18a373b
chore: Update snapshots
at-susie Jul 10, 2026
20bdb99
Merge branch 'main' into onetheme/box-accent
at-susie Jul 10, 2026
4501937
chore: Remove custom CSS property for box visual accent borderRadius
at-susie Jul 10, 2026
440d570
chore: Update snapshots
at-susie Jul 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
{
"path": "lib/components/internal/widget-exports.js",
"brotli": false,
"limit": "1350 kB",
"limit": "1360 kB",
"ignore": "react-dom"
}
],
Expand Down
172 changes: 172 additions & 0 deletions pages/box/visual-accent.page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import React from 'react';

import Box, { BoxProps } from '~components/box';
import Container from '~components/container';
import Header from '~components/header';
import Icon from '~components/icon';
import KeyValuePairs from '~components/key-value-pairs';
import List from '~components/list';
import SpaceBetween from '~components/space-between';

import ScreenshotArea from '../utils/screenshot-area';

// ─── Data ──────────────────────────────────────────────────────────────────────

const ALL_VARIANTS: BoxProps.VisualAccent.Color[] = [
'red',
'yellow',
'indigo',
'green',
'orange',
'purple',
'mint',
'lime',
'grey',
'teal',
'cyan',
'blue',
'violet',
'fuchsia',
'magenta',
'pink',
'rose',
'amber',
];

const BOX_VARIANTS: { variant: BoxProps['variant']; label: string; content: string }[] = [
{ variant: 'h3', label: 'h3', content: 'Heading 3' },
{ variant: 'p', label: 'p', content: 'Body paragraph text' },
];

const LIST_ITEMS: { id: string; content: string; icon: string; color: BoxProps.VisualAccent.Color }[] = [
{ id: 'health', content: 'Health overview', icon: 'face-happy', color: 'green' },
{ id: 'functions', content: 'Functions', icon: 'script', color: 'indigo' },
{ id: 'network', content: 'Network configuration', icon: 'globe', color: 'grey' },
{ id: 'multi-session', content: 'Multi-session data', icon: 'multiscreen', color: 'purple' },
{ id: 'alert', content: 'Alert center', icon: 'security', color: 'red' },
{ id: 'communication', content: 'Communication', icon: 'contact', color: 'mint' },
];

// ─── Page ──────────────────────────────────────────────────────────────────────

export default function StyleBoxPage() {
return (
<ScreenshotArea disableAnimations={true} style={{ display: 'flex', justifyContent: 'center' }}>
<article style={{ inlineSize: '90%' }}>
<Box variant="h1" padding={{ bottom: 'l' }}>
Box visualAccent
</Box>

<Box variant="p" color="text-body-secondary" padding={{ bottom: 'xl' }}>
Uses the existing Box component with a new <code>visualAccent</code> prop. No wrapper component or utility
classes needed.
</Box>

{/* ── Box text variants × accent colors ─────────────────────────── */}
<Box variant="h2" padding={{ top: 'l', bottom: 'm' }}>
Text inside accent boxes
</Box>

{BOX_VARIANTS.map(({ variant, label, content }) => (
<section key={label}>
<Box variant="h3" padding={{ top: 'l', bottom: 's' }}>
Wrapping Box variant=&quot;{label}&quot;
</Box>
<SpaceBetween size="m" direction="horizontal">
{ALL_VARIANTS.map(color => (
<Box
key={color}
variant={variant}
visualAccent={{ color, borderRadius: 'xxxs' }}
padding={{ horizontal: 'xxxs', vertical: 'n' }}
>
{content}
</Box>
))}
</SpaceBetween>
</section>
))}

{/* ── Icons in accent boxes ─────────────────────────────────────── */}
<Box variant="h2" padding={{ top: 'xxxl', bottom: 'm' }}>
Icons in accent boxes
</Box>
<SpaceBetween size="m" direction="horizontal">
{ALL_VARIANTS.map(color => (
<Box key={color} visualAccent={{ color, aspectRatio: 'equal', borderRadius: 'full' }}>
<Icon name="check" size="medium" />
</Box>
))}
</SpaceBetween>

{/* ── Application in components ──────────────────────────────────── */}
<Box variant="h2" padding={{ top: 'xxxl', bottom: 'm' }}>
Application in components
</Box>

<Container header={<Header variant="h3">KeyValuePairs</Header>}>
<KeyValuePairs
columns={3}
items={[
{
label: 'Components',
value: (
<Box
visualAccent={{ color: 'mint' }}
padding={{ horizontal: 'xxxs', vertical: 'xxxs' }}
margin={{ top: 'xxs' }}
>
<span style={{ fontSize: '20px' }}>114</span>
</Box>
),
},
{
label: 'Patterns',
value: (
<Box
visualAccent={{ color: 'mint' }}
padding={{ horizontal: 'xxxs', vertical: 'xxxs' }}
margin={{ top: 'xxs' }}
>
<span style={{ fontSize: '20px' }}>81</span>
</Box>
),
},
{
label: 'Demos',
value: (
<Box
visualAccent={{ color: 'mint' }}
padding={{ horizontal: 'xxxs', vertical: 'xxxs' }}
margin={{ top: 'xxs' }}
>
<span style={{ fontSize: '20px' }}>35</span>
</Box>
),
},
]}
/>
</Container>

<Box padding={{ top: 'xl' }} />
<Container header={<Header variant="h3">List</Header>}>
<List
ariaLabel="List with accent icon badges"
items={LIST_ITEMS}
renderItem={item => ({
id: item.id,
content: item.content,
icon: (
<Box padding={'s'} visualAccent={{ color: item.color, borderRadius: 'xs', aspectRatio: 'equal' }}>
<Icon name={item.icon as any} size="medium" />
</Box>
),
})}
/>
</Container>
</article>
</ScreenshotArea>
);
}
Loading
Loading