-
Notifications
You must be signed in to change notification settings - Fork 6
Button Specification
- Overview
- User Stories
- Functionality
- Test Scenarios
- Accessibility
- Assumptions and Limitations
- References
Team Name: CodeX
Developer Name: Diyan Dimitrov
Designer Name:
- Peer Developer Name | Date:
- Design Manager Name | Date:
- Radoslav Mirchev| Date:
- Radoslav Karaivanov | Date:
Version | Users | Date | Notes |
---|---|---|---|
1 | Names of Developers and Designers | Date |
The <igc-button>
and <igc-link-button>
are elements which provide functionality of a button by wrapping <button>
and <a>
element respectively.
<igc-button type="raised">Click me</igc-button>
<igc-link-button type="raised" href="https://www.infragistics.com">Click me</igc-link-button>
- Click the button to perform an action.
- Click the button to navigate to a URL.
- Differentiation between states (enabled/disabled, focused, pressed)
- The button component should support different types according to the material spec such as flat, outlined, raised, etc.
- The button component should have configurations specific for
<button>
and<a>
elements. - The button component should support a set of sizing options such as small, medium and large.
- The button component should have customizable content, prefix and suffix.
Elaborate more on the multi-facetted use cases
Developer stories:
- Story 1: As a developer, I want to specify a type of the button - flat, raised, outlined, icon, fab.
- Story 2: As a developer, I want to be able to disable the button.
- Story 3: As a developer, I want to specify the size of the button - small, medium, large.
- Story 4: As a developer, I want to set
<button>
specific properties like type (submit, reset, button). - Story 5: As a developer, I want to set
<a>
specific properties like href, download, target, rel. - Story 6: As a developer, I want to specify a text label or custom content of the button.
- Story 7: As a developer, I want to specify a prefix/suffix element of the button.
End-user stories:
- Story 1: As an end-user, I want to click a button which performs an action.
- Story 2: As an end-user, I want to click a button which navigates to a URL.
Describe behavior, design, look and feel of the implemented feature. Always include visual mock-up
3.1. End-User Experience
** Integration scenarios or functionality with other features/components prototype ** End-to-end user experienceprototype ** Prepared design files for styling e.g. interplay with features and light/dark variants design hand-off
3.2. Developer Experience
3.3. Globalization/Localization
Describe any special localization requirements such as the number of localizable strings, regional formats
3.4. Keyboard Navigation
Keys | Description |
---|---|
3.5. API
Name | Description | Type | Default value |
---|---|---|---|
variant | The variant of the button. | flat | raised | outlined | icon | fab |
flat |
disabled | Determines whether the button is disabled. | boolean |
false |
size | The size of the button. | small | medium | large |
large |
type | Specifies the type of the <button> element. |
button | reset | submit |
button |
Name | Description | Type | Default value |
---|---|---|---|
variant | The variant of the button. | flat | raised | outlined | icon | fab |
flat |
disabled | Determines whether the button is disabled. | boolean |
false |
size | The size of the button. | small | medium | large |
large |
href | The URL of the hyperlink. | string |
undefined |
download | Prompts the user to save the linked URL instead of navigating to it. | string |
undefined |
target | Specifies where to open the linked URL. | _blank | _parent | _self | _top |
undefined |
rel | Specifies the relationship between the current document and the linked one. | string |
undefined |
Name | Description | Return type | Parameters |
---|---|---|---|
focus | Sets focus on the native element. | options?: FocusOptions |
|
blur | Removes focus from the native element. |
Name | Description | Cancelable | Parameters |
---|---|---|---|
igcFocus | Emitted when the button gets focus. | ||
igcBlur | Emitted when the button loses focus. |
Name | Description |
---|---|
(default) | Renders the label of the button. |
prefix | Renders content before the default slot. |
suffix | Renders content after the default slot. |
Name | Description |
---|---|
native | The native <button> /<a> element. |
Automation
- Scenario 1:
- scenario 2:
ARIA Support
RTL Support
Assumptions | Limitation Notes |
---|---|