The Button component wraps a native HTMLDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Avendaosander/Plataforma-social/llms.txt
Use this file to discover all available pages before exploring further.
<button> element with a composable set of style variants. It uses clsx and tailwind-merge for class resolution, meaning any className you pass is merged cleanly with the internal variant classes — no specificity conflicts. The component accepts all standard HTML button attributes via ...rest, so onClick, type, disabled, aria-*, and any other native attribute work out of the box.
Props
Controls the visual style of the button.
solid renders a filled background, outline renders a transparent background with a colored ring border, flat uses a lightly tinted background at reduced opacity, and ghost renders text only with no background.Maps to the project’s custom Tailwind color palette.
primary uses the seagreen scale, secondary uses the biscay (blue) scale, and destructive uses the maroon (red) scale.Controls the font size of the button label.
sm = text-sm, md = text-base, lg = text-lg. Padding is not affected by size — use className to override padding directly.Sets horizontal margin.
"auto" applies mx-auto for centering the button within a flex or block container. "none" applies mx-0.Controls the border radius.
"none" = square corners (rounded-none), "sm" = rounded-lg, "md" = rounded-xl, "lg" = rounded-2xl, "full" = pill shape (rounded-full).When
true, applies m-0 to reset all margin on the button, preventing extra surrounding space around an icon-only button. Use this when children is omitted and only startContent or endContent is rendered.A React node rendered before the button label inside the
<button> element. Commonly used for leading icons.A React node rendered after the button label inside the
<button> element. Commonly used for trailing icons or badges.All standard HTML button attributes —
onClick, type, disabled, aria-label, form, etc. — are forwarded directly to the underlying <button> element.Variants
The four variant options each have distinct visual semantics. All variants support the same threecolor values and respect dark mode automatically.
| Variant | Light mode | Dark mode override |
|---|---|---|
solid | Filled background matching the color token | primary switches from seagreen to storm-900 |
outline | Transparent fill + ring-2 border in the color token | No automatic override — use className |
flat | 20% opacity fill of the color token | primary shifts to storm-300/20; secondary to full biscay-950 |
ghost | Text color only, no background or border | primary text switches to white |
Color palette reference
The threecolor values map to custom Tailwind color scales defined in tailwind.config.ts:
primary→seagreenscale (seagreen-900for backgrounds,seagreen-900for text/ring)secondary→biscayscale (deep blue,biscay-950)destructive→maroonscale (red,maroon-900)
Usage
Dark Mode
Dark mode is driven by Tailwind’sclass strategy (darkMode: 'class' in tailwind.config.ts). The dark class is toggled on <html> at runtime — see ButtonDarkMode.tsx for the reference implementation.
The
solid + primary combination automatically switches its background from bg-seagreen-900 to bg-storm-900 in dark mode — no extra className needed.