- The passed icon needs to come from our list of svg icons. Can be flipped {
- // eslint-disable-next-line react/no-unescaped-entities
- } to the other side by passing iconSide="right".
-
- Setting the isLoading prop to true will add the loading spinner or
- swap the existing icon for the loading spinner and set the button to disabled. It is good
- practice to also rename the button to "Loading…".
-
- When aligning EuiButtonEmpty components to the left or the right,
- you should make sure they’re flush with the edge of their container, so that they’re
- horizontally-aligned with the other content in the container.
-
+ The passed icon needs to come from our list of svg icons. Can be flipped {
+ // eslint-disable-next-line react/no-unescaped-entities
+ } to the other side by passing iconSide="right".
+
- This is a specialized component that combines EuiButton and EuiToggle to
- create a button with an on/off state. You can pass all the same parameters to it as you
- can to EuiButton. The main difference is that, it does not accept any children,
- but a label prop instead. This is for the handling of accessiblity with
- the EuiToggle.
+ Setting the isLoading prop to true will add the loading spinner or swap
+ the existing icon for the loading spinner and set the button to disabled. It is good
+ practice to also rename the button to "Loading…".
- The EuiButtonToggle does not have any inherit visual state differences.
- These you must apply in your implementation.
+ EuiButtonEmpty is used when you want to make a button look like a
+ regular link, but still want to align it to the rest of the buttons.
- Button groups are handled similarly to the way checkbox and radio groups are
- handled but made to look like buttons. They group multiple EuiButtonToggles
- and utilize the type="single" or "multi" prop
- to determine whether multiple or only single selections are allowed per group.
+ When aligning EuiButtonEmpty components to the left or the right, you
+ should make sure they’re flush with the edge of their container, so that
+ they’re horizontally-aligned with the other content in the container.
+ This is a specialized component that combines EuiButton and{' '}
+ EuiToggle to create a button with an on/off state. You can pass all
+ the same parameters to it as you can to EuiButton. The main
+ difference is that, it does not accept any children, but a label prop
+ instead. This is for the handling of accessiblity with the EuiToggle.
+
+
+ The EuiButtonToggle does not have any inherit visual state
+ differences. These you must apply in your implementation.
+
+ Button groups are handled similarly to the way checkbox and radio groups are handled but
+ made to look like buttons. They group multiple EuiButtonToggles and
+ utilize the type="single" or{' '}
+ "multi" prop to determine whether multiple or only single
+ selections are allowed per group.
+
+
+ Stylistically, all button groups are the size of small buttons, do not stretch to fill
+ the container and typically should only be color="text"{' '}
+ (default) or "primary". If your just displaying a group of
+ icons, add the prop isIconOnly.
+
- Stylistically, all button groups are the size of small buttons, do not stretch to fill the container
- and typically should only be color="text" (default)
- or "primary".
- If your just displaying a group of icons, add the prop isIconOnly.
+ For buttons on dark color backgrounds, you can pass{' '}
+ color='ghost' to any of the button styles on this page. These
+ should be used extremely rarely, and are only for placing buttons on top of dark or
+ image-based backgrounds. A good example of their use is in the{' '}
+ EuiBottomBar component.
- For buttons on dark color backgrounds, you can pass color='ghost' to
- any of the button styles on this page. These should be used extremely rarely, and are
- only for placing buttons on top of dark or image-based backgrounds.
- A good example of their use is in the EuiBottomBar component.
-
+ Facet buttons are to be used when allowing lists with multiple search params to be
+ filtered down by these particular params. They allow for an icon node
+ and/or quantity to be passed. You can also indicate the current selection
+ with isSelected. Other props include isDisabled{' '}
+ and isLoading (which will swap the quantity indicator with a loading icon).
+
+
+ On their own, these buttons are inline-block elements which work well in horizontal
+ applications. However, to get the layout you see below, wrap the group of buttons
+ in a{' '}
+
+ <EuiFlexGroup direction="column" gutterSize="none" />
+ . There is no need to wrap individual buttons in an EuiFlexItem.
+
On their own, these buttons are inline-block elements which work well in horizontal
applications. However, to get the layout you see below, wrap the group of buttons
@@ -312,8 +336,7 @@ export const ButtonExample = {
- Facet buttons are to be used when allowing lists with multiple search params to be
- filtered down by these particular params. They allow for an icon node
- and/or quantity to be passed. You can also indicate the current selection
- with isSelected. Other props include isDisabled{' '}
- and isLoading (which will swap the quantity indicator with a loading icon).
-
- On their own, these buttons are inline-block elements which work well in horizontal
- applications. However, to get the layout you see below, wrap the group of buttons
- in a{' '}
-
- <EuiFlexGroup direction="column" gutterSize="none" />
- . There is no need to wrap individual buttons in an EuiFlexItem.
-
+ Facet buttons are to be used when allowing lists with multiple search params to be
+ filtered down by these particular params. They allow for an icon node
+ and/or quantity to be passed. You can also indicate the current selection
+ with isSelected. Other props include isDisabled{' '}
+ and isLoading (which will swap the quantity indicator with a loading icon).
+
+ On their own, these buttons are inline-block elements which work well in horizontal
+ applications. However, to get the layout you see below, wrap the group of buttons
+ in a{' '}
+
+ <EuiFlexGroup direction="column" gutterSize="none" />
+ . There is no need to wrap individual buttons in an EuiFlexItem.
+
- Facet buttons are to be used when allowing lists with multiple search params to be
- filtered down by these particular params. They allow for an icon node
- and/or quantity to be passed. You can also indicate the current selection
- with isSelected. Other props include isDisabled{' '}
- and isLoading (which will swap the quantity indicator with a loading icon).
-
- On their own, these buttons are inline-block elements which work well in horizontal
- applications. However, to get the layout you see below, wrap the group of buttons
- in a{' '}
-
- <EuiFlexGroup direction="column" gutterSize="none" />
- . There is no need to wrap individual buttons in an EuiFlexItem.
+ EuiFacetButtons are to be used when allowing lists with multiple search params to be
+ filtered down by these particular params. They allow for an icon node and/or{' '}
+ quantity to be passed. You can also indicate the current selection with{' '}
+ isSelected. Other props include isDisabled and{' '}
+ isLoading (which will swap the quantity indicator with a loading icon).
+ Typically, each facet grouping should display similarly. For example, they should all
+ have icons or be similar icon nodes (like avatars). It is is up to you whether each
+ group should be single or multi-selection.
+
+
+ Utilize the EuiFacetGroup wrapper to correctly layout multiple facets. You
+ can supply a layout of either horizontal or{' '}
+ vertical with the default being vertical. Be sure to contain
+ vertical layouts in a skinny component or give it a max-width.
+