From 99b318ce165bfa7742dd236a0c67146d663b4495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kuna?= <1282324+codecalm@users.noreply.github.com> Date: Tue, 8 Sep 2026 00:30:17 +0200 Subject: [PATCH] Name classes instead of Astro props in preview card descriptions (#2995) --- .changeset/preview-subtitles-classes.md | 5 +++++ preview/pages/accordion.astro | 10 +++++----- preview/pages/alerts.astro | 10 +++++----- preview/pages/avatars.astro | 10 +++++----- preview/pages/buttons.astro | 2 +- preview/pages/charts-advanced.astro | 2 +- preview/pages/pagination.astro | 4 ++-- preview/pages/patterns.astro | 4 ++-- preview/pages/progress.astro | 12 ++++++------ preview/pages/segmented-control.astro | 16 ++++++++-------- preview/pages/stars-rating.astro | 6 +++--- preview/pages/tables.astro | 2 +- preview/pages/tags.astro | 4 ++-- 13 files changed, 46 insertions(+), 41 deletions(-) create mode 100644 .changeset/preview-subtitles-classes.md diff --git a/.changeset/preview-subtitles-classes.md b/.changeset/preview-subtitles-classes.md new file mode 100644 index 000000000..75d9db3b7 --- /dev/null +++ b/.changeset/preview-subtitles-classes.md @@ -0,0 +1,5 @@ +--- +"@tabler/preview": patch +--- + +Updated the preview card descriptions to name CSS classes and markup instead of Astro component props. diff --git a/preview/pages/accordion.astro b/preview/pages/accordion.astro index 3dfe1588b..3d08467af 100644 --- a/preview/pages/accordion.astro +++ b/preview/pages/accordion.astro @@ -25,7 +25,7 @@ import DocsLink from '@ui/DocsLink.astro' Flush - Add flush to remove the card border and rounded corners. + Add accordion-flush to remove the card border and rounded corners. @@ -34,7 +34,7 @@ import DocsLink from '@ui/DocsLink.astro' Tabs - Add tabs for a tab-like header instead of the default style. + Add accordion-tabs for a tab-like header instead of the default style. @@ -43,7 +43,7 @@ import DocsLink from '@ui/DocsLink.astro' Inverted - Add inverted to flip the toggle icon to the start of the header. + Add accordion-inverted to flip the toggle icon to the start of the header. @@ -52,7 +52,7 @@ import DocsLink from '@ui/DocsLink.astro' Inverted with plus icon - Combine inverted with a custom toggleIcon. + Combine accordion-inverted with accordion-button-toggle-plus and a custom icon in the toggle. @@ -61,7 +61,7 @@ import DocsLink from '@ui/DocsLink.astro' With icons - Add showIcon to show an icon next to each panel's title. + Add an accordion-button-icon next to each panel's title. diff --git a/preview/pages/alerts.astro b/preview/pages/alerts.astro index 01889e5af..0eef41f83 100644 --- a/preview/pages/alerts.astro +++ b/preview/pages/alerts.astro @@ -28,7 +28,7 @@ import DocsLink from '@ui/DocsLink.astro' With action - Add a link with the action prop to give users something to do next. + Add an alert-action link to give users something to do next. @@ -40,7 +40,7 @@ import DocsLink from '@ui/DocsLink.astro' Dismissible - Add showClose to let users close the alert. + Add alert-dismissible and a btn-close button to let users close the alert. @@ -52,7 +52,7 @@ import DocsLink from '@ui/DocsLink.astro' With a description - Add a description or a list when the title alone isn't enough context. + Add an alert-description or an alert-list when the title alone isn't enough context. @@ -64,7 +64,7 @@ import DocsLink from '@ui/DocsLink.astro' Important - Add important for a bolder style that stands out from the rest of the page. + Add alert-important for a bolder style that stands out from the rest of the page. @@ -78,7 +78,7 @@ import DocsLink from '@ui/DocsLink.astro' Minor - Add minor for a quieter style that fits inline with other content. + Add alert-minor for a quieter style that fits inline with other content. diff --git a/preview/pages/avatars.astro b/preview/pages/avatars.astro index e38305739..a6ad680f2 100644 --- a/preview/pages/avatars.astro +++ b/preview/pages/avatars.astro @@ -42,7 +42,7 @@ const brands = ['netflix', 'amazon', 'messenger', 'figma', 'twitch'] Avatar with icon - Use an icon instead of a photo with the icon prop. + Put an icon inside the avatar instead of a photo.
{iconIcons.map((icon) => )}
@@ -64,7 +64,7 @@ const brands = ['netflix', 'amazon', 'messenger', 'figma', 'twitch'] Simple avatar - Pass a person object to render their photo. + Show a photo by setting it as the background-image of the avatar.
{people8.map((person) => )}
@@ -75,7 +75,7 @@ const brands = ['netflix', 'amazon', 'messenger', 'figma', 'twitch'] Avatar placeholder - Fall back to initials with the placeholder prop when there's no photo. + Fall back to initials as the avatar text when there's no photo.
{people8.map((person) => )}
@@ -99,7 +99,7 @@ const brands = ['netflix', 'amazon', 'messenger', 'figma', 'twitch'] Avatar sizes - Six sizes from xxs to xl, for both photos and placeholders. + Six sizes from avatar-xxs to avatar-xl, for both photos and placeholders.
@@ -160,7 +160,7 @@ const brands = ['netflix', 'amazon', 'messenger', 'figma', 'twitch'] Avatar statuses - Add a status dot to show online, away, or busy state. + Add a badge inside the avatar for an online, away, or busy status dot. {statusColors.map((color, i) => )} diff --git a/preview/pages/buttons.astro b/preview/pages/buttons.astro index ad83c0d1e..94f8b7525 100644 --- a/preview/pages/buttons.astro +++ b/preview/pages/buttons.astro @@ -83,7 +83,7 @@ const sizes = ['sm', 'md', 'lg', 'xl'] as const Sizes - Scale a button from sm to xl without changing its icon layout. + Scale a button from btn-sm to btn-xl without changing its icon layout.
{ sizes.map((size) => ( diff --git a/preview/pages/charts-advanced.astro b/preview/pages/charts-advanced.astro index a4a2aa83d..f30ff96e4 100644 --- a/preview/pages/charts-advanced.astro +++ b/preview/pages/charts-advanced.astro @@ -16,7 +16,7 @@ import DocsLink from '@ui/DocsLink.astro' Two y-axes - Plot values with different units together. Bind each axis to a serie with seriesName and move the second one to the right with opposite. + Plot values with different units together. Bind each axis to a series with the yaxis.seriesName chart option and move the second one to the right with opposite. diff --git a/preview/pages/pagination.astro b/preview/pages/pagination.astro index aa38386d9..18916d47d 100644 --- a/preview/pages/pagination.astro +++ b/preview/pages/pagination.astro @@ -16,7 +16,7 @@ import DocsLink from '@ui/DocsLink.astro' Numbered - Page numbers, with or without text Prev/Next labels. + Page numbers, with or without Prev/Next text labels (page-text). @@ -26,7 +26,7 @@ import DocsLink from '@ui/DocsLink.astro' With descriptions - Add prevDescription/nextDescription to name the adjacent page. + Name the adjacent page with page-item-subtitle for the direction and page-item-title for the page name. diff --git a/preview/pages/patterns.astro b/preview/pages/patterns.astro index a356abde0..bbecac14e 100644 --- a/preview/pages/patterns.astro +++ b/preview/pages/patterns.astro @@ -59,7 +59,7 @@ const patterns = ['diagonal', 'diagonal-2', 'dots', 'rectangles', 'lines', 'line Pattern sizes - Scale the pattern from sm to xl. + Scale the pattern from bg-pattern-sm to bg-pattern-xl.
{ patternSizes.map((size) => ( @@ -77,7 +77,7 @@ const patterns = ['diagonal', 'diagonal-2', 'dots', 'rectangles', 'lines', 'line Pattern opacity - Scale the pattern strength with lighter, light, dark, or darker. + Scale the pattern strength with the bg-pattern-opacity-* utilities.
{ patternOpacities.map((opacity) => ( diff --git a/preview/pages/progress.astro b/preview/pages/progress.astro index f78b159db..7a67a55d6 100644 --- a/preview/pages/progress.astro +++ b/preview/pages/progress.astro @@ -34,7 +34,7 @@ import DocsLink from '@ui/DocsLink.astro' With value - Show the exact percentage inside a larger bar with showValue. + Show the exact percentage as the progress-bar text inside a larger bar.
@@ -61,7 +61,7 @@ import DocsLink from '@ui/DocsLink.astro' Sizes - Scale a bar from sm to xl. + Scale a bar from progress-sm to progress-xl.
@@ -75,7 +75,7 @@ import DocsLink from '@ui/DocsLink.astro' Indeterminate - Animate a bar with no known end point using indeterminate. + Animate a bar with no known end point with progress-bar-indeterminate.
@@ -98,7 +98,7 @@ import DocsLink from '@ui/DocsLink.astro' Striped - Add diagonal stripes with striped for a textured look. + Add diagonal stripes with progress-bar-striped for a textured look.
@@ -112,7 +112,7 @@ import DocsLink from '@ui/DocsLink.astro' Animated - Combine striped with animated to keep the stripes moving. + Combine progress-bar-striped with progress-bar-animated to keep the stripes moving.
@@ -241,7 +241,7 @@ import DocsLink from '@ui/DocsLink.astro' Progress Description Sizes - Scale the labeled progress bar from sm to xl. + Scale the labeled progress bar from progress-sm to progress-xl.
diff --git a/preview/pages/segmented-control.astro b/preview/pages/segmented-control.astro index 1b655facc..639a19ff0 100644 --- a/preview/pages/segmented-control.astro +++ b/preview/pages/segmented-control.astro @@ -16,7 +16,7 @@ import DocsLink from '@ui/DocsLink.astro' Basic - A list of items is enough for a plain control. + A nav-segmented with text nav-link items is enough for a plain control. @@ -34,7 +34,7 @@ import DocsLink from '@ui/DocsLink.astro' Icons only - Pass icons without items for an icon-only control. + Put only an icon in each nav-link for an icon-only control. @@ -43,7 +43,7 @@ import DocsLink from '@ui/DocsLink.astro' With icons - Combine items and icons to label each option. + Combine an icon and text in each nav-link to label each option. @@ -52,7 +52,7 @@ import DocsLink from '@ui/DocsLink.astro' Vertical - Add vertical to stack the options in a column. + Add nav-segmented-vertical to stack the options in a column. @@ -61,7 +61,7 @@ import DocsLink from '@ui/DocsLink.astro' Vertical with disabled items - Pass indexes to disabled to make specific options unselectable. + Add disabled to a nav-link to make that option unselectable. @@ -88,7 +88,7 @@ import DocsLink from '@ui/DocsLink.astro' Independent group - Set a unique name so this control doesn't share selection state with others using the same items. + Use radio inputs with a unique name so this control doesn't share selection state with others using the same items. @@ -97,7 +97,7 @@ import DocsLink from '@ui/DocsLink.astro' Full width - Add block to stretch the control across its container. + Add w-100 to stretch the control across its container. @@ -118,7 +118,7 @@ import DocsLink from '@ui/DocsLink.astro' Sizes - Set size to sm or lg — with text, icons, or both. + Add nav-sm or nav-lg to change the size — with text, icons, or both.
diff --git a/preview/pages/stars-rating.astro b/preview/pages/stars-rating.astro index c8b58c19f..3d4f85be4 100644 --- a/preview/pages/stars-rating.astro +++ b/preview/pages/stars-rating.astro @@ -25,7 +25,7 @@ import DocsLink from '@ui/DocsLink.astro' Icons - Swap the star for any icon with the icon prop. + Swap the star for any icon by passing a different SVG to the stars option.
@@ -39,7 +39,7 @@ import DocsLink from '@ui/DocsLink.astro' Sizes - Match the rating to surrounding text with size. + Match the rating to surrounding text with an icon-sm or icon-lg class on the star.
@@ -52,7 +52,7 @@ import DocsLink from '@ui/DocsLink.astro' Colors - Set color to any theme or extended color to match the rest of the page. + Color the star with a text-* class, any theme or extended color, to match the rest of the page.
diff --git a/preview/pages/tables.astro b/preview/pages/tables.astro index 89f76c5b5..a9cbd91d8 100644 --- a/preview/pages/tables.astro +++ b/preview/pages/tables.astro @@ -35,7 +35,7 @@ import DocsLink from '@ui/DocsLink.astro'
Striped rows - Alternate row shading with striped to make wide tables easier to scan. + Alternate row shading with table-striped to make wide tables easier to scan.
diff --git a/preview/pages/tags.astro b/preview/pages/tags.astro index c7caea9e8..4556d6302 100644 --- a/preview/pages/tags.astro +++ b/preview/pages/tags.astro @@ -101,7 +101,7 @@ const colors = Object.values(siteData.colors) as { class: string; title: string Selectable tags - Add checkbox to let users toggle a tag on and off. + Add a tag-check checkbox to let users toggle a tag on and off. {range(1, 6).map((i) => )} {range(7, 12).map((i) => )} @@ -114,7 +114,7 @@ const colors = Object.values(siteData.colors) as { class: string; title: string Tags with badge - Add a badge count to the end of the tag. + Add a tag-badge count to the end of the tag. {range(1, 12).map((i) => )}