diff --git a/apps/www/content/primitives/components/button.mdx b/apps/www/content/primitives/components/button.mdx
index fbdf816b7..76cdd8a6d 100644
--- a/apps/www/content/primitives/components/button.mdx
+++ b/apps/www/content/primitives/components/button.mdx
@@ -5,7 +5,9 @@ description: Triggers a click action usually performed by the user to trigger an
---
-
+
## Usages
@@ -26,54 +28,46 @@ Import all parts and piece them together.
Click here!`} border />
+`} border />
-
## Props
The `Button` component accepts the following props:
-- `variant`: Visual style variant (`"primary"` | `"secondary"` | `"outline"` | `"ghost"` | `"danger"` | `"text"`, default: "primary")
+- `variant`: Visual style variant (`"solid"` | `"outline"` | `"ghost"` | `"text"`, default: "solid")
+- `color`: Color theme (`"accent"` | `"danger"` | `"neutral"` | `"success"`, default: "accent")
- `size`: Size of the button (`"small"` | `"normal"`, default: "normal")
- `disabled`: Whether the button is disabled (boolean, default: false)
- `loading`: Shows a loading spinner inside the button (boolean)
- `loaderText`: Optional text to display next to the loading spinner (ReactNode)
- `leadingIcon`: Icon element to display before button text (ReactNode)
- `trailingIcon`: Icon element to display after button text (ReactNode)
+- `maxWidth`: Custom maximum width for the button (string | number)
- `width`: Custom width for the button (string | number)
- `asChild`: Boolean to merge props onto child element
- `className`: Additional CSS class names
- All other ButtonHTMLAttributes from React
+## Variants
-## Variant
-
-Variants allow you to customize the button's style, making it visually distinctive and suitable for different purposes. Default is `Primary`.
+Variants allow you to customize the button's style, making it visually distinctive and suitable for different purposes. Default is `solid`.
Primary button`,
- },
- {
- name: "Secondary",
- code: ``,
+ name: "Solid",
+ code: ``,
},
{
name: "Outline",
- code: ``,
+ code: ``,
},
{
name: "Ghost",
code: ``,
},
- {
- name: "Danger",
- code: ``,
- },
{
name: "Text",
code: ``,
@@ -81,54 +75,85 @@ Variants allow you to customize the button's style, making it visually distincti
]}
/>
+## Colors
+
+Colors help convey the purpose and importance of actions. The color prop only affects solid and outline variants. Default is `accent`.
+
+
+
+
+`,
+ },
+ {
+ name: "Danger",
+ code: `
+
+
+
+
`,
+ },
+ {
+ name: "Neutral",
+ code: `
+
+
+
+
`,
+ },
+ {
+ name: "Success",
+ code: `
+
+
+
+
`,
+ },
+ ]}
+/>
## Scale
-The Button component offers two size options to accommodate various design requirements. By selecting the `normal` size, you can create buttons that are visually larger, making it more prominent and noticeable within the user interface. Default size is `normal`.
+The Button component offers two size options. Default size is `normal`.
primary button`,
+ code: ``,
},
{
name: "Normal",
- code: ``,
+ code: ``,
},
]}
/>
## Disabled
-The Button component provides a "disabled" state, which prevents the button from responding to any user actions. When a button is disabled, it becomes unclickable and does not trigger any associated actions or events.
-
-This feature is useful when you want to indicate that a button is temporarily inactive or unavailable for interaction. Default is `false`.
+The Button component provides a "disabled" state, which prevents the button from responding to any user actions. Default is `false`.
Primary button`,
- },
- {
- name: "Secondary",
- code: ``,
+ name: "Solid",
+ code: ``,
},
{
name: "Outline",
- code: ``,
+ code: ``,
},
{
name: "Ghost",
code: ``,
},
- {
- name: "Danger",
- code: ``,
- },
{
name: "Text",
code: ``,
@@ -138,32 +163,30 @@ This feature is useful when you want to indicate that a button is temporarily in
## Loading
-The Button component offers inbuilt loading states. Loading state is used to signify an ongoing process after the user has clicked on the button. Loading is an optional prop.
-
-Note: A loading as `true` only disables the button click and displays a spinner within the button. `loading` does not changes the button appearance as disabled. For changing the appearance to disabled state, a `disabled` prop as `true` has to passed.
+The Button component offers inbuilt loading states. Loading state is used to signify an ongoing process after the user has clicked on the button.
-
-
-
+
+
+
`}
/>
## With leading and trailing icons
-The button component accepts optional leading and/or trailing icons. A `ReactNode` can be passed as a prop.
+The button component accepts optional leading and/or trailing icons.
-
-
-
+
+
+
`}
/>
diff --git a/apps/www/examples/shield-ts/assets.tsx b/apps/www/examples/shield-ts/assets.tsx
index f0a109bc4..ecf26af22 100644
--- a/apps/www/examples/shield-ts/assets.tsx
+++ b/apps/www/examples/shield-ts/assets.tsx
@@ -182,9 +182,44 @@ export const Assets = () => {