--- import { ucFirst } from '@shared/lib/string-format' import DefaultLayout from '@shared/layouts/DefaultLayout.astro' import Icon from '@ui/Icon.astro' import Button from '@ui/Button.astro' import ButtonList from '@ui/ButtonList.astro' import Card from '@ui/Card.astro' import CardBody from '@ui/CardBody.astro' import CardTitle from '@ui/CardTitle.astro' import CardSubtitle from '@ui/CardSubtitle.astro' import site from '@data/site.json' import DocsLink from '@ui/DocsLink.astro' type ColorEntry = [string, { title: string; icon?: string }] const themeColors = Object.entries(site.themeColors) as ColorEntry[] const colors = Object.entries(site.colors) as ColorEntry[] const socialColors = Object.entries(site.socialColors) as ColorEntry[] const actions = ['edit', 'copy', 'settings', 'clipboard', 'x'] const sizes = ['sm', 'md', 'lg', 'xl'] as const ---
Basic Add an icon to the left, the right, or drop the label for an icon-only button.
Shapes Round the corners with .btn-pill, or square them off with .btn-square.
Action buttons Compact, icon-only buttons for card headers and toolbars.
{ actions.map((action) => ( )) }
Sizes Scale a button from btn-sm to btn-xl without changing its icon layout.
{ sizes.map((size) => (
Animated icon Small hover animations draw attention to the icon.
Standard Fill a button with a theme color to mark its purpose. { themeColors.map(([name, color]) => ( )) }
Outline Keep the border colored and the background transparent for a subtler action. { themeColors.map(([name, color]) => ( )) }
Ghost Drop the border too — color appears only on hover. { themeColors.map(([name, color]) => ( )) }
Pill Combine .btn-pill with a theme color. { themeColors.map(([name, color]) => ( )) }
Square Combine .btn-square with a theme color. { themeColors.map(([name, color]) => ( )) }
Extra colors The full Tabler palette, beyond the eight theme colors. { colors.map(([name, color]) => ( )) }
Social colors Brand colors for linking out to social networks. { socialColors.map(([name, app]) => ( )) }
Icon buttons Social brand colors without a label, for compact toolbars. { socialColors.map(([name, app]) => ( )) }