Button

Trigger actions with accessible button styles and states.

Button

Solid (default)

Buttons are fundamental interactive controls. SButton provides consistent active, focus, and hover states with a concise API.

Flat

You can change the full style towards flat of a button with the flat property that its value is a boolean, so just adding it will change the styles

Border

You can change the full style towards border of a button with the border property that its value is a boolean so just adding it will change the styles

Gradient

You can change the full style towards Gradient of a button with the gradient property that its value is a boolean, so just adding it will change the styles

Gradient Auto Color

Gradient colors are automatically generated by the color property which in this example is the primary color

Relief

Change the style of the button to a relief aspect with the relief property, the property is a boolean so you can add it without any value.

Transparent

Change the style of the button with the transparent property, the property is a boolean so you can add it without any value.

Shadow

Change the style of the button with the shadow property, the property is a boolean so you can add it without any value.

Color

Change the color of the Button component with the color property and the color value for example (#fff, rgba (100,10,5) or the main colors of Sax Design), this will only affect the component and its value can be dynamic

Allowed values

The color prop supports the Sax Design theme colors: primary, success, danger, warn, dark
Custom RGB and HEX colors are also supported.

Boolean color props (optional)

Theme colors can also be enabled directly through Boolean props.
For example, add warn to use the warning color.

Icon

If you need an icon-only button use the icon property, the property is a boolean so you can add it without any value.

This property makes the button have a specific size making it the same width and height, do not use when it is icon and text

Default icons

Sax Design Vue renders build-time Iconify SVG data. Built-in controls, such as close buttons in Alert or Popup, use SVG icons and require no external icon font. Use the #icon slot when a product needs another icon.

Find and use icons

Search Boxicons for a collection and copy its prefix:name value into SIcon.

Icon - Text

If you need a button with text and icon you can do them by adding them in the slot default.

Circle

You can completely round the corners with the circle property, the property is a boolean so you can add it without any value.

Square

You can make all the corners completely straight with the Square property, the property is a boolean so you can add it without any value.

Shape

Choose rounded, square or circle geometry with shape. The global configuration here is square; the local rounded override keeps the normal rounded treatment.

Size

Change the size of the entire button including padding, font-size and border with the size property

Button keeps five size values. Its shared small, medium, and large values use the same 32px, 36px, and 40px control heights as other components; mini and xl extend below and above that common scale.

values:

  • xl
  • large
  • medium (default)
  • small
  • mini

Loading

Use #prefix and #suffix for icons before or after the label. Icons may still be passed through the default slot when no dedicated placement is needed. While loading-type="logo" is active, the original icon fades into the brand loader before its lead-in begins. When loading ends, the loader completes its restoration motion before fading back to the original icon. The loader uses prefix, or suffix when no prefix exists; with both slots, prefix takes priority. If neither icon slot exists, the loader keeps its centered transparent overlay. Select pulse, ripple, or shimmer for another surface animation. Every mode preserves button size and prevents clicks. Use #loading for fully custom content.

Click rate limiting

debounce and throttle limit emitted click events without changing button layout. debounce uses a trailing invocation and defaults to 50ms. throttle emits the first click immediately; set debounce="false" before assigning a numeric throttle delay. If both props are numbers, the component logs an error and applies only debounce.

Upload

Now you can add a status of sending or uploading data to the server with the upload property, the property is a boolean so you can add it without any value.

Block

You can make the button have the full width allowed with the block property, the property is a boolean so you can add it without any value.

Animate

You can create an animation to the component by adding template ``#animate `and the content will be the one that appears when the component is animated

You can also change the type of animation with the animation-type property and the allowed values ​​are ( vertical, scale, rotate)

Social

Using the colors of social networks is very common in a project either a login button or a share button so Sax Design makes it easy for you to search for each color and just by putting the name of the network you already change the whole style of the component

Supported colors: (facebook, twitter, youtube, pinterest, linkedin, snapchat, whatsapp, tumblr, reddit, spotify, amazon, medium, vimeo, skype, dribbble, slack, yahoo, twitch, discord, telegram, google-plus, messenger)

Floating

You can make a float style button easily with the Floating property, the property is a boolean so you can add it without any value.

these buttons usually do an important action in specific and go with a fixed position in the lower corner

Group

If you need to make a group of buttons you can use the sub-component <s-button-group> </s-button-group> and inside the default slot put the buttons you want to group

Toggle

This is an example of what you can achieve with simple logic and few lines of code.

Ripple

Feedback begins on press and stays clipped inside the button, beneath its text. Omitting ripple uses the soft glow pulse (glow); expand spreads from the press position, reverse contracts inward and cut splits outward. Use ring for an expanding halo or glow for a soft light pulse. Only the internal light animates; the button keeps its position and shape. Mouse, touch and keyboard activation are supported; disabled or loading buttons do not trigger an effect.

API

PROPS

Property
Type
Values
Description
default
Example
More
size
String | Number
xl | large | medium | small | mini | number
Control size; omission uses medium.
medium
shape
String
rounded | circle | square
Button geometry. Explicit rounded overrides a global square configuration; circle and square remain compatible.
—
String
primarysuccessdangerwarningdarkRGBHEX
Change the color of the component and some of its sub components.
primary
type
String
solidflatbordergradienttransparentshadowrelieffloating
Change the style of the component and its states.
solid
active
Boolean
truefalse
Determine if the component is active and change its style to that state.
false
loading
Boolean
truefalse
Keep the button content visible, show the selected loading preset, preserve its size, and prevent interaction.
false
loading-type
String
logopulserippleshimmer
Choose the class-driven loading preset without changing the button markup.
logo
disabled
Boolean
truefalse
Disable the button and prevent user interaction.
false
debounce
Number | false
numberfalse
Debounce emitted click events in milliseconds. When both click limiters are numbers, debounce wins and an error is logged.
50
throttle
Number | false
numberfalse
Throttle emitted click events in milliseconds. Set debounce to false to enable it.
false
upload
Boolean
truefalse
Determine if the component has the upload status active by changing the style and adding the animation.
false
to
String
url - vue-router
Add the functionality of vue-router to the button, clicking it will redirect to the last route.
false
href
String
href - link
Add an href of an external link to add the functionality by clicking on the component.
false
blank
Boolean
truefalse
as in an html element `a` determines whether a new window is opened or the current one is replaced.
false
icon
Boolean
truefalse
Determine if the component contains only one icon, by adding this property the component has an equal width and height.
false
circle
Boolean
truefalse
Change the border radius to give a circle style.
false
square
Boolean
truefalse
Change the border radius to give a rectangle style.
false
block
Boolean
truefalse
Change the width of the component to the possible total determined by the parent element.
false
animationType
Boolean
truefalse
Change the type of animation, this property only works if you have the slot animate.
false
animateInactive
Boolean
truefalse
Determine if the animation is active for the user when hovering.
false
ripple
String
glowexpandreversecutring
Change ripple style of a button with the `ripple` property
glow

EVENTS

Event
Type
Description
default
Example
More
click
MouseEvent
Fires after debounce or throttle handling when an enabled, non-loading button is activated.
—
—

SLOTS

Slot
Scope
Description
default
Example
More
prefix
null
Place an icon before the button label. During default loading, the brand loader replaces this slot; prefix takes priority when both icon slots exist.
—
suffix
null
Place an icon after the button label. During default loading, the brand loader replaces this slot when prefix is absent.
—
loading
null
Replace the selected loading preset with custom loading content.
—
animate
null
Slot To add the element that will be displayed in the animation.
—
Last Updated: 2026-10-28, 06:17:56 UTC
Copied