Outline Button
Have a clear border around a transparent interior with text typically in the same color as the border.
It's important to note that the terms "solid button" and "outline button" describe visual
styles in user interface design, and should not be confused with the HTML <button> element used in web development.
Default
<!-- source -->
<Button family="outline">Outline Button</Button>States
Button states represent the button's appearance and behavior in response to user interactions and system conditions.
Element states
Element states (inset)
When the button is used at the edges of the viewport or in other situations where outlines are partially hidden.
Use the inset attribute to set to inset the outlines.
<!-- source -->
<Button family="outline" inset="true">Outline Button</Button>Selected state
The selected state of a button, which is not an element state, refers to a visually distinct condition indicating that the button has been chosen or activated.
Use the selected and selectedFamily/selectedVariant attribute to set to controll the selected state.
<!-- where selected is a boolean -->
<Button family="outline" selected={selected} selectedVariant="2" selectedFamily="soft" aria-selected="true">Solid Button</Button>Only use the aria-selected attribute when the contents of the button is not changed between selected states.
Button contents
Sometimes the content of the button needs to change when the state is selected.
<!-- where selected is a boolean -->
<Button family="outline" selected={selected} selectedFamily="soft" onclick={() => selected = !selected}>
<Button.Selected>Selected Button</Button.Selected>
<Button.Unselected>Unselected Button</Button.Unselected>
</Button>Variants
In a multibrand environment, adopting "variant" in place of "intent" offers a more neutral and adaptable approach to characterizing various component versions, free from associations specific to each brand's identity or design.
Use the variant attribute to choose the variant.
<!-- source -->
<Button family="outline" variant="2">Outline Button</Button>Sizes
Use the size attribute to choose the size.
<!-- source -->
<Button family="outline" size="lg">Outline Button</Button>Button with icon
Buttons may include an icon before or after the text label.
Icon before
<!-- source -->
<Button family="outline">
<svg aria-hidden="true" focusable="false" viewBox="0 0 24 24" ><path fill="currentColor" d="m12 15.39l-3.76 2.27l.99-4.28l-3.32-2.88l4.38-.37L12 6.09l1.71 4.04l4.38.37l-3.32 2.88l.99 4.28M22 9.24l-7.19-.61L12 2L9.19 8.63L2 9.24l5.45 4.73L5.82 21L12 17.27L18.18 21l-1.64-7.03L22 9.24Z"/></svg>
Outline Button
</Button>Icon after
<!-- source -->
<Button family="outline">
Outline Button
<svg aria-hidden="true" focusable="false" viewBox="0 0 24 24" ><path fill="currentColor" d="m12 15.39l-3.76 2.27l.99-4.28l-3.32-2.88l4.38-.37L12 6.09l1.71 4.04l4.38.37l-3.32 2.88l.99 4.28M22 9.24l-7.19-.61L12 2L9.19 8.63L2 9.24l5.45 4.73L5.82 21L12 17.27L18.18 21l-1.64-7.03L22 9.24Z"/></svg>
</Button>Icon Button
When displaying only an icon, enable the icon attribute; this will give the button a square shape.
<!-- source -->
<Button family="outline" icon="true" aria-label="Outline Button">
<svg aria-hidden="true" focusable="false" viewBox="0 0 24 24" ><path fill="currentColor" d="m12 15.39l-3.76 2.27l.99-4.28l-3.32-2.88l4.38-.37L12 6.09l1.71 4.04l4.38.37l-3.32 2.88l.99 4.28M22 9.24l-7.19-.61L12 2L9.19 8.63L2 9.24l5.45 4.73L5.82 21L12 17.27L18.18 21l-1.64-7.03L22 9.24Z"/></svg>
</Button>At the very least, the aria-label attribute should be used on an icon button to provide a textual description of its function, enhancing accessibility for users who rely on screen readers.
When the button is set to icon mode, all variants and sizes remain applicable.
Pill
The button pill attribute forces the button into a fully rounded version.
Use the pill attribute to set to pill the button.
<!-- source -->
<Button family="outline" pill="true">Outline Button</Button>Boxed
The button boxed attribute forces square corners.
Use the boxed attribute to set to boxed the button.
<!-- source -->
<Button family="outline" boxed="true">Outline Button</Button>Justified
By default, a button's size is determined by its label or icon. When justified, it stretches to fill the entire width of its container.
<!-- source -->
<Button family="outline" justified="true">
Outline Button
</Button><!-- source -->
<Button family="outline" justified="true">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatibus nesciunt molestias odit voluptate magnam ex aliquam vel inventore, cum enim veniam earum odio placeat iusto suscipit consequatur voluptatem dicta laudantium.
</Button>