@fundamental-styles/mcp 0.41.7-rc.8 → 0.41.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/AI_USAGE.md +425 -0
- package/data/CHANGELOG.md +53 -3
- package/data/component-catalog.json +62 -209
- package/data/components/README.md +281 -0
- package/data/components/action-bar.md +443 -0
- package/data/components/ai-busy-indicator.md +79 -0
- package/data/components/ai-loading-bar.md +66 -0
- package/data/components/avatar-btp.md +198 -0
- package/data/components/avatar-group.md +2660 -0
- package/data/components/avatar-product-switch.md +476 -0
- package/data/components/avatar.md +993 -0
- package/data/components/bar.md +574 -0
- package/data/components/border-radius.md +148 -0
- package/data/components/border.md +412 -0
- package/data/components/breadcrumb.md +546 -0
- package/data/components/button-2.md +440 -0
- package/data/components/button-action-sheet.md +292 -0
- package/data/components/button-ai.md +730 -0
- package/data/components/button-btp.md +223 -0
- package/data/components/button-button.md +233 -0
- package/data/components/button-counter.md +176 -0
- package/data/components/button-patterns.md +731 -0
- package/data/components/button-split.md +459 -0
- package/data/components/button.md +469 -0
- package/data/components/calendar.md +5784 -0
- package/data/components/card-card-media.md +707 -0
- package/data/components/card-card.md +2426 -0
- package/data/components/card-layouts.md +1201 -0
- package/data/components/card.md +2404 -0
- package/data/components/carousel.md +1506 -0
- package/data/components/code.md +139 -0
- package/data/components/component-reset.md +272 -0
- package/data/components/components-icons-businesssuiteinappsymbol-icons.md +85 -0
- package/data/components/components-icons-sap-icons.md +147 -0
- package/data/components/components-icons-tnt-icons.md +85 -0
- package/data/components/container-queries.md +221 -0
- package/data/components/container.md +227 -0
- package/data/components/dialog-docs-static-busy-indicator.md +165 -0
- package/data/components/dialog-docs-static-dialog.md +949 -0
- package/data/components/dialog-docs-static-patterns.md +147 -0
- package/data/components/dialog-docs-static-settings.md +528 -0
- package/data/components/dialog-docs-static.md +982 -0
- package/data/components/dialog.md +606 -0
- package/data/components/dynamic-page-dynamic-page.md +1914 -0
- package/data/components/dynamic-page.md +973 -0
- package/data/components/dynamic-side.md +197 -0
- package/data/components/elevation.md +110 -0
- package/data/components/feed-input.md +346 -0
- package/data/components/feed-list.md +580 -0
- package/data/components/fieldset-2.md +292 -0
- package/data/components/fieldset-forms.md +169 -0
- package/data/components/fieldset.md +381 -0
- package/data/components/flexible-column-layout.md +205 -0
- package/data/components/form-group.md +287 -0
- package/data/components/form-header.md +71 -0
- package/data/components/form-item-2.md +98 -0
- package/data/components/form-item-3.md +134 -0
- package/data/components/form-item-4.md +556 -0
- package/data/components/form-item-5.md +182 -0
- package/data/components/form-item-6.md +539 -0
- package/data/components/form-item-7.md +239 -0
- package/data/components/form-item-ai.md +158 -0
- package/data/components/form-item-file-uploader.md +445 -0
- package/data/components/form-item-forms.md +234 -0
- package/data/components/form-item-patterns.md +426 -0
- package/data/components/form-item.md +464 -0
- package/data/components/form-label-ai.md +126 -0
- package/data/components/form-label-layouts.md +306 -0
- package/data/components/form-label-patterns.md +1175 -0
- package/data/components/form-label-status-indicator.md +1083 -0
- package/data/components/form-label-step-input.md +620 -0
- package/data/components/form-label.md +2876 -0
- package/data/components/generic-tag.md +747 -0
- package/data/components/grid-list-grid-list.md +1185 -0
- package/data/components/grid-list.md +1449 -0
- package/data/components/heading.md +66 -0
- package/data/components/horizontal-navigation.md +568 -0
- package/data/components/icon-tab-bar-dev.md +190 -0
- package/data/components/icon-tab-bar.md +2620 -0
- package/data/components/icon.md +171 -0
- package/data/components/iconBusinessSuite.md +92 -0
- package/data/components/iconTnt.md +92 -0
- package/data/components/illustrated-message.md +439 -0
- package/data/components/info-label.md +348 -0
- package/data/components/input-group.md +2068 -0
- package/data/components/label.md +66 -0
- package/data/components/layout-grid.md +447 -0
- package/data/components/layout-panel.md +261 -0
- package/data/components/layouts-layout-grid.md +608 -0
- package/data/components/layouts-paddings.md +133 -0
- package/data/components/layouts-section.md +287 -0
- package/data/components/list-2.md +148 -0
- package/data/components/list-3.md +735 -0
- package/data/components/list-list.md +790 -0
- package/data/components/list-object-list.md +1225 -0
- package/data/components/list.md +1286 -0
- package/data/components/media-queries.md +168 -0
- package/data/components/menu.md +946 -0
- package/data/components/message-box-docs-static-ai.md +149 -0
- package/data/components/message-box-docs-static.md +527 -0
- package/data/components/message-page-upload-collection.md +678 -0
- package/data/components/message-page.md +256 -0
- package/data/components/message-strip.md +977 -0
- package/data/components/message-toast.md +119 -0
- package/data/components/micro-process-flow.md +991 -0
- package/data/components/navigation-menu.md +366 -0
- package/data/components/navigation-navigation.md +1245 -0
- package/data/components/navigation.md +2604 -0
- package/data/components/numeric-content.md +317 -0
- package/data/components/object-attribute.md +96 -0
- package/data/components/object-identifier.md +227 -0
- package/data/components/object-marker.md +202 -0
- package/data/components/object-number.md +327 -0
- package/data/components/object-status.md +1538 -0
- package/data/components/off-screen.md +87 -0
- package/data/components/overflow.md +97 -0
- package/data/components/padding.md +122 -0
- package/data/components/paddings.md +130 -0
- package/data/components/page.md +300 -0
- package/data/components/pagination.md +672 -0
- package/data/components/panel-layouts.md +345 -0
- package/data/components/panel.md +514 -0
- package/data/components/patterns-label.md +74 -0
- package/data/components/popover-2.md +906 -0
- package/data/components/popover-ai.md +466 -0
- package/data/components/popover-btp.md +886 -0
- package/data/components/popover-deprecated.md +308 -0
- package/data/components/popover-message-popover.md +683 -0
- package/data/components/popover-notification.md +1511 -0
- package/data/components/popover-patterns.md +1100 -0
- package/data/components/popover-popover.md +1862 -0
- package/data/components/popover-quick-view.md +385 -0
- package/data/components/popover-timepicker.md +1836 -0
- package/data/components/popover-user-menu.md +1303 -0
- package/data/components/popover.md +1938 -0
- package/data/components/progress-indicator.md +351 -0
- package/data/components/prompt-input-ai.md +226 -0
- package/data/components/prompt-input.md +226 -0
- package/data/components/rating-indicator.md +1469 -0
- package/data/components/resizable-card-layout.md +951 -0
- package/data/components/scrollbar.md +86 -0
- package/data/components/search-field.md +287 -0
- package/data/components/section.md +250 -0
- package/data/components/segmented-button.md +324 -0
- package/data/components/shellbar.md +2183 -0
- package/data/components/side-nav.md +1562 -0
- package/data/components/skeleton.md +243 -0
- package/data/components/slider.md +395 -0
- package/data/components/splitter.md +353 -0
- package/data/components/table.md +2749 -0
- package/data/components/tabs.md +658 -0
- package/data/components/text-text.md +380 -0
- package/data/components/text.md +253 -0
- package/data/components/tile.md +1132 -0
- package/data/components/time.md +818 -0
- package/data/components/title.md +153 -0
- package/data/components/titles.md +83 -0
- package/data/components/token.md +311 -0
- package/data/components/tokenizer.md +398 -0
- package/data/components/tool-header.md +1352 -0
- package/data/components/tool-layout.md +199 -0
- package/data/components/toolbar-ai.md +174 -0
- package/data/components/toolbar-btp.md +526 -0
- package/data/components/toolbar-title-bar.md +473 -0
- package/data/components/toolbar.md +432 -0
- package/data/components/tree.md +1031 -0
- package/data/components/typography.md +435 -0
- package/data/components/variant-management.md +360 -0
- package/data/components/vertical-nav.md +589 -0
- package/data/components/wizard.md +1429 -0
- package/data/examples/Components/dialog/device-specifications.example.html +39 -30
- package/data/examples/Components/shellbar/optional-items.example.html +210 -157
- package/data/examples/Components/shellbar/overflow-toolbar.example.html +202 -177
- package/data/examples/Components/shellbar/responsive-paddings.example.html +217 -146
- package/data/examples/Components/shellbar/responsiveness.example.html +825 -613
- package/data/examples/Components/user-menu/default.example.html +241 -83
- package/data/schemas/badge.schema.json +1 -1
- package/data/schemas/button-split.schema.json +1 -1
- package/data/schemas/component-frontmatter.schema.json +123 -0
- package/data/schemas/component-markdown.schema.json +81 -0
- package/data/schemas/counter.schema.json +1 -1
- package/data/schemas/dynamic-page.schema.json +1 -1
- package/data/schemas/dynamic-side-content.schema.json +1 -1
- package/data/schemas/facet.schema.json +1 -1
- package/data/schemas/fieldset.schema.json +1 -1
- package/data/schemas/flexible-column-layout.schema.json +1 -1
- package/data/schemas/form-group.schema.json +3 -2
- package/data/schemas/form-header.schema.json +1 -1
- package/data/schemas/form-label.schema.json +1 -0
- package/data/schemas/form-message.schema.json +1 -1
- package/data/schemas/grid-list.schema.json +1 -1
- package/data/schemas/input-group.schema.json +1 -1
- package/data/schemas/layout-panel.schema.json +1 -1
- package/data/schemas/page.schema.json +1 -1
- package/data/schemas/quick-view.schema.json +2 -1
- package/data/schemas/section.schema.json +1 -1
- package/data/schemas/side-nav.schema.json +1 -1
- package/data/schemas/splitter.schema.json +1 -1
- package/data/schemas/tabs.schema.json +1 -1
- package/data/schemas/tile.schema.json +1 -1
- package/data/schemas/tool-layout.schema.json +1 -1
- package/data/schemas/user-menu.schema.json +10 -0
- package/data/schemas/wizard.schema.json +1 -1
- package/package.json +1 -1
- package/src/data/load-catalog.d.ts +2 -0
- package/src/data/load-catalog.js +5 -1
- package/src/data/load-catalog.js.map +1 -1
- package/src/data/load-markdown-docs.d.ts +44 -0
- package/src/data/load-markdown-docs.js +179 -0
- package/src/data/load-markdown-docs.js.map +1 -0
- package/src/data/markdown-cache.d.ts +60 -0
- package/src/data/markdown-cache.js +218 -0
- package/src/data/markdown-cache.js.map +1 -0
- package/src/server.js +72 -1
- package/src/server.js.map +1 -1
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: fd-title
|
|
3
|
+
title: Components/Title
|
|
4
|
+
category: Components
|
|
5
|
+
selector: fd-title
|
|
6
|
+
cssFile: title.css
|
|
7
|
+
sourcePath: packages/styles/stories/Components/title/title.stories.js
|
|
8
|
+
tags: []
|
|
9
|
+
dependencies: ["title"]
|
|
10
|
+
relatedComponents: ["title"]
|
|
11
|
+
stability: stable
|
|
12
|
+
generatedAt: 2026-06-09T18:29:01.368Z
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Components/Title
|
|
16
|
+
|
|
17
|
+
A title component whose semantic level and visual appearance can be set separately, providing flexibility in design while adhering to accessibility best practices.
|
|
18
|
+
|
|
19
|
+
## Dependencies
|
|
20
|
+
|
|
21
|
+
This component depends on the following CSS files:
|
|
22
|
+
|
|
23
|
+
- `title.css`
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install fundamental-styles
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<!-- Include theme -->
|
|
33
|
+
<link href="node_modules/fundamental-styles/dist/theming/sap_horizon.css" rel="stylesheet">
|
|
34
|
+
|
|
35
|
+
<!-- Include component CSS -->
|
|
36
|
+
<link href="node_modules/fundamental-styles/dist/title.css" rel="stylesheet">
|
|
37
|
+
|
|
38
|
+
<!-- Include dependencies -->
|
|
39
|
+
<link href="node_modules/fundamental-styles/dist/title.css" rel="stylesheet">
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Basic Usage
|
|
43
|
+
|
|
44
|
+
```html
|
|
45
|
+
<h1 class="fd-title fd-title--h1">Title Level 1</h1>
|
|
46
|
+
<h2 class="fd-title fd-title--h2">Title Level 2</h2>
|
|
47
|
+
<h3 class="fd-title fd-title--h3">Title Level 3</h3>
|
|
48
|
+
<h4 class="fd-title fd-title--h4">Title Level 4</h4>
|
|
49
|
+
<h5 class="fd-title fd-title--h5">Title Level 5</h5>
|
|
50
|
+
<h6 class="fd-title fd-title--h6">Title Level 6</h6>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Modifiers
|
|
54
|
+
|
|
55
|
+
| Class | Description |
|
|
56
|
+
|-------|-------------|
|
|
57
|
+
| `fd-title--h` | There are 6 semantic levels of a heading element |
|
|
58
|
+
| `fd-title--wrap` | Add the `--wrap` modifier to cause the overflow text to wrap instead. |
|
|
59
|
+
|
|
60
|
+
## Related Components
|
|
61
|
+
|
|
62
|
+
This component works with or depends on:
|
|
63
|
+
|
|
64
|
+
- `title`
|
|
65
|
+
|
|
66
|
+
## Design Tokens
|
|
67
|
+
|
|
68
|
+
Key CSS variables used by this component:
|
|
69
|
+
|
|
70
|
+
- `--fdTitle_Color`
|
|
71
|
+
- `--fdTitle_Font_Family`
|
|
72
|
+
- `--fdTitle_Font_Size`
|
|
73
|
+
- `--h1`
|
|
74
|
+
- `--h2`
|
|
75
|
+
- `--h3`
|
|
76
|
+
- `--h4`
|
|
77
|
+
- `--h5`
|
|
78
|
+
- `--h6`
|
|
79
|
+
- `--sapFontHeader1Size`
|
|
80
|
+
- `--sapFontHeader2Size`
|
|
81
|
+
- `--sapFontHeader3Size`
|
|
82
|
+
- `--sapFontHeader4Size`
|
|
83
|
+
- `--sapFontHeader5Size`
|
|
84
|
+
- `--sapFontHeader6Size`
|
|
85
|
+
|
|
86
|
+
*...and 4 more*
|
|
87
|
+
|
|
88
|
+
## Examples
|
|
89
|
+
|
|
90
|
+
### Semantic Level
|
|
91
|
+
|
|
92
|
+
There are 6 semantic levels of a heading element. There should only be one H1 on a page, and headings should only appear in ascending order without skipping a level; i.e. even if there are only 3 levels on a page, the order must be H1-H2-H3, and no other levels used.
|
|
93
|
+
|
|
94
|
+
```html
|
|
95
|
+
<h1 class="fd-title fd-title--h1">Title Level 1</h1>
|
|
96
|
+
<h2 class="fd-title fd-title--h2">Title Level 2</h2>
|
|
97
|
+
<h3 class="fd-title fd-title--h3">Title Level 3</h3>
|
|
98
|
+
<h4 class="fd-title fd-title--h4">Title Level 4</h4>
|
|
99
|
+
<h5 class="fd-title fd-title--h5">Title Level 5</h5>
|
|
100
|
+
<h6 class="fd-title fd-title--h6">Title Level 6</h6>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### VisualLevel
|
|
104
|
+
|
|
105
|
+
If a design requires it, the visual level can be set to something different than the semantic level. This allows the sequential order to be maintained while providing flexibility in appearance.
|
|
106
|
+
|
|
107
|
+
```html
|
|
108
|
+
<h1 class="fd-title fd-title--h6">Title Level 1</h1>
|
|
109
|
+
<h2 class="fd-title fd-title--h5">Title Level 2</h2>
|
|
110
|
+
<h3 class="fd-title fd-title--h4">Title Level 3</h3>
|
|
111
|
+
<h4 class="fd-title fd-title--h3">Title Level 4</h4>
|
|
112
|
+
<h5 class="fd-title fd-title--h2">Title Level 5</h5>
|
|
113
|
+
<h6 class="fd-title fd-title--h1">Title Level 6</h6>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Text Elision
|
|
117
|
+
|
|
118
|
+
By default the Title text overflow will be elided when longer than its container.
|
|
119
|
+
|
|
120
|
+
```html
|
|
121
|
+
<h1 class="fd-title fd-title--h1">Lorem ipsum dolor sit amet, consectetur adipiscing elit</h1>
|
|
122
|
+
<h2 class="fd-title fd-title--h2">Lorem ipsum dolor sit amet, consectetur adipiscing elit</h2>
|
|
123
|
+
<h3 class="fd-title fd-title--h3">Lorem ipsum dolor sit amet, consectetur adipiscing elit</h3>
|
|
124
|
+
<h4 class="fd-title fd-title--h4">Lorem ipsum dolor sit amet, consectetur adipiscing elit</h4>
|
|
125
|
+
<h5 class="fd-title fd-title--h5">Lorem ipsum dolor sit amet, consectetur adipiscing elit</h5>
|
|
126
|
+
<h6 class="fd-title fd-title--h6">Lorem ipsum dolor sit amet, consectetur adipiscing elit</h6>
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Text Wrapping
|
|
130
|
+
|
|
131
|
+
Add the `--wrap` modifier to cause the overflow text to wrap instead.
|
|
132
|
+
|
|
133
|
+
```html
|
|
134
|
+
<h1 class="fd-title fd-title--h1 fd-title--wrap">Lorem ipsum dolor sit amet, consectetur adipiscing elit</h1>
|
|
135
|
+
<h2 class="fd-title fd-title--h2 fd-title--wrap">Lorem ipsum dolor sit amet, consectetur adipiscing elit</h2>
|
|
136
|
+
<h3 class="fd-title fd-title--h3 fd-title--wrap">Lorem ipsum dolor sit amet, consectetur adipiscing elit</h3>
|
|
137
|
+
<h4 class="fd-title fd-title--h4 fd-title--wrap">Lorem ipsum dolor sit amet, consectetur adipiscing elit</h4>
|
|
138
|
+
<h5 class="fd-title fd-title--h5 fd-title--wrap">Lorem ipsum dolor sit amet, consectetur adipiscing elit</h5>
|
|
139
|
+
<h6 class="fd-title fd-title--h6 fd-title--wrap">Lorem ipsum dolor sit amet, consectetur adipiscing elit</h6>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Accessibility
|
|
143
|
+
|
|
144
|
+
- Use semantic HTML elements where appropriate
|
|
145
|
+
- Include proper ARIA attributes for interactive elements
|
|
146
|
+
- Ensure keyboard navigation support
|
|
147
|
+
- Provide adequate color contrast
|
|
148
|
+
|
|
149
|
+
## Source
|
|
150
|
+
|
|
151
|
+
This documentation was automatically generated from: `packages/styles/stories/Components/title/title.stories.js`
|
|
152
|
+
|
|
153
|
+
For the latest updates and interactive examples, see [Storybook](https://sap.github.io/fundamental-styles/).
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: title
|
|
3
|
+
title: Titles
|
|
4
|
+
category: page-title
|
|
5
|
+
selector:
|
|
6
|
+
cssFile:
|
|
7
|
+
sourcePath: packages/common-css/stories/page-title/title.stories.js
|
|
8
|
+
tags: []
|
|
9
|
+
dependencies: []
|
|
10
|
+
relatedComponents: []
|
|
11
|
+
stability: stable
|
|
12
|
+
generatedAt: 2026-06-09T18:29:01.664Z
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Titles
|
|
16
|
+
|
|
17
|
+
Page Title, Section Title, and Subsection Title can be used as building blocks for home pages. These elements follow a responsive spacing system for horizontal padding, which can be disabled using the <code>.no-inline-padding</code> modifier class.
|
|
18
|
+
|
|
19
|
+
Typically, there is only one <b>Page Title</b> (optional), displayed in the content area above the group name. The top padding of a <b>Section Title</b> varies depending on whether a <b>Page Title</b> is present. Additionally, the vertical padding of a <b>Section Title</b> depends on its position — whether it is the first <b>Section Title</b> on the page or situated between sections. <br><b>Subsection Title</b> has no padding-top, but if there's no <b>Section Title</b>, than <b>Subsection Title</b> adds 1rem padding-top.
|
|
20
|
+
|
|
21
|
+
## Basic Usage
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<div class="sap-page-title sap-bg-color-errorBackground">Page Title</div>
|
|
25
|
+
<div class="sap-section-title sap-bg-color-informationBackground">Section Title (first, after Page Title)</div>
|
|
26
|
+
<div class="sap-subsection-title sap-bg-color-warningBackground">Subsection Title</div>
|
|
27
|
+
|
|
28
|
+
<div class="sap-section-title sap-bg-color-informationBackground">Section Title (between sections)</div>
|
|
29
|
+
<div class="sap-subsection-title sap-bg-color-warningBackground">Subsection Title</div>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Examples
|
|
33
|
+
|
|
34
|
+
### Page Title, Section Title and Subsection Title
|
|
35
|
+
|
|
36
|
+
The first <b>Section Title</b> under the <b>Page Title</b> has a 0.5rem top padding. Between sections, the top padding is 3rem for XL, L, and M screens, and 2rem for S screens.<br><br><b style="color: red">NOTE: The background color for the titles is added for illustration purposes.</b>
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<div class="sap-page-title sap-bg-color-errorBackground">Page Title</div>
|
|
40
|
+
<div class="sap-section-title sap-bg-color-informationBackground">Section Title (first, after Page Title)</div>
|
|
41
|
+
<div class="sap-subsection-title sap-bg-color-warningBackground">Subsection Title</div>
|
|
42
|
+
|
|
43
|
+
<div class="sap-section-title sap-bg-color-informationBackground">Section Title (between sections)</div>
|
|
44
|
+
<div class="sap-subsection-title sap-bg-color-warningBackground">Subsection Title</div>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Section Title and Subsection Title (no Page Title)
|
|
48
|
+
|
|
49
|
+
When there is no <b>Page Title</b>, the first <b>Section Title</b> has a top padding of 1.5rem. The padding between sections remains the same: 3rem for XL, L, and M screens, and 2rem for S screens. <br><br><b style="color: red">NOTE: The background color for the titles is added for illustration purposes.</b>
|
|
50
|
+
|
|
51
|
+
```html
|
|
52
|
+
<div class="sap-section-title sap-bg-color-informationBackground">Section Title (first)</div>
|
|
53
|
+
<div class="sap-subsection-title sap-bg-color-warningBackground">Subsection Title</div>
|
|
54
|
+
|
|
55
|
+
<div class="sap-section-title sap-bg-color-informationBackground">Section Title (between sections)</div>
|
|
56
|
+
<div class="sap-subsection-title sap-bg-color-warningBackground">Subsection Title</div>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### NoInlinePadding
|
|
60
|
+
|
|
61
|
+
To disable the responsive horizontal (inline) paddings add <code>.no-inline-padding</code> on the title element.
|
|
62
|
+
|
|
63
|
+
```html
|
|
64
|
+
<div class="sap-page-title no-inline-padding sap-bg-color-errorBackground">Page Title</div>
|
|
65
|
+
<div class="sap-section-title no-inline-padding sap-bg-color-informationBackground">Section Title (first)</div>
|
|
66
|
+
<div class="sap-subsection-title no-inline-padding sap-bg-color-warningBackground">Subsection Title</div>
|
|
67
|
+
|
|
68
|
+
<div class="sap-section-title no-inline-padding sap-bg-color-informationBackground">Section Title (between sections)</div>
|
|
69
|
+
<div class="sap-subsection-title no-inline-padding sap-bg-color-warningBackground">Subsection Title</div>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Accessibility
|
|
73
|
+
|
|
74
|
+
- Use semantic HTML elements where appropriate
|
|
75
|
+
- Include proper ARIA attributes for interactive elements
|
|
76
|
+
- Ensure keyboard navigation support
|
|
77
|
+
- Provide adequate color contrast
|
|
78
|
+
|
|
79
|
+
## Source
|
|
80
|
+
|
|
81
|
+
This documentation was automatically generated from: `packages/common-css/stories/page-title/title.stories.js`
|
|
82
|
+
|
|
83
|
+
For the latest updates and interactive examples, see [Storybook](https://sap.github.io/fundamental-styles/).
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: fd-token
|
|
3
|
+
title: Components/Token
|
|
4
|
+
category: Components
|
|
5
|
+
selector: fd-token
|
|
6
|
+
cssFile: token.css
|
|
7
|
+
sourcePath: packages/styles/stories/Components/token/token.stories.js
|
|
8
|
+
tags: []
|
|
9
|
+
dependencies: ["input","token"]
|
|
10
|
+
relatedComponents: ["input","token"]
|
|
11
|
+
stability: stable
|
|
12
|
+
generatedAt: 2026-06-09T18:29:01.368Z
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Components/Token
|
|
16
|
+
|
|
17
|
+
Tokens are small items of information (similar to tags) that mainly serve to visualize previously selected items. The tokenizer is the container that handles the tokens. Tokens can be added, removed, selected, or deselected.
|
|
18
|
+
|
|
19
|
+
##Usage
|
|
20
|
+
- Use tokens only in the **Multi Input** component.
|
|
21
|
+
|
|
22
|
+
The default token is displayed in grey with text, and a close button that will remove the token when selected.
|
|
23
|
+
|
|
24
|
+
| **Modifier Class** | **Usage** |
|
|
25
|
+
| -----: | :----- |
|
|
26
|
+
| \
|
|
27
|
+
|
|
28
|
+
## Usage Guidelines
|
|
29
|
+
|
|
30
|
+
- Use tokens only in the **Multi Input** component.
|
|
31
|
+
|
|
32
|
+
The default token is displayed in grey with text, and a close button that will remove the token when selected.
|
|
33
|
+
|
|
34
|
+
| **Modifier Class** | **Usage** |
|
|
35
|
+
| -----: | :----- |
|
|
36
|
+
| \
|
|
37
|
+
|
|
38
|
+
## Dependencies
|
|
39
|
+
|
|
40
|
+
This component depends on the following CSS files:
|
|
41
|
+
|
|
42
|
+
- `input.css`
|
|
43
|
+
- `token.css`
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm install fundamental-styles
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```html
|
|
52
|
+
<!-- Include theme -->
|
|
53
|
+
<link href="node_modules/fundamental-styles/dist/theming/sap_horizon.css" rel="stylesheet">
|
|
54
|
+
|
|
55
|
+
<!-- Include component CSS -->
|
|
56
|
+
<link href="node_modules/fundamental-styles/dist/token.css" rel="stylesheet">
|
|
57
|
+
|
|
58
|
+
<!-- Include dependencies -->
|
|
59
|
+
<link href="node_modules/fundamental-styles/dist/input.css" rel="stylesheet">
|
|
60
|
+
<link href="node_modules/fundamental-styles/dist/token.css" rel="stylesheet">
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Basic Usage
|
|
64
|
+
|
|
65
|
+
```html
|
|
66
|
+
<style>
|
|
67
|
+
.docs-tokens {
|
|
68
|
+
width: 100%;
|
|
69
|
+
}
|
|
70
|
+
.docs_tokens_item_wrapper {
|
|
71
|
+
display: flex;
|
|
72
|
+
}
|
|
73
|
+
.docs-tokens-container {
|
|
74
|
+
display: grid;
|
|
75
|
+
grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
|
|
76
|
+
column-gap: 0.1rem;
|
|
77
|
+
row-gap: 0.1rem;
|
|
78
|
+
padding: 1rem;
|
|
79
|
+
justify-items: right;
|
|
80
|
+
align-items: center;
|
|
81
|
+
}
|
|
82
|
+
</style>
|
|
83
|
+
|
|
84
|
+
<section class="docs-tokens">
|
|
85
|
+
<div class="docs-tokens-container">
|
|
86
|
+
|
|
87
|
+
<div>Regular</div>
|
|
88
|
+
<div>Selected</div>
|
|
89
|
+
</div>
|
|
90
|
+
<div class="docs-tokens-container">
|
|
91
|
+
<div>Normal</div>
|
|
92
|
+
<span class="fd-token" role="button" tabindex="0">
|
|
93
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
94
|
+
<button class="fd-token__close" tabindex="-1" aria-label="Bibendum token close"></button>
|
|
95
|
+
</span>
|
|
96
|
+
<span class="fd-token fd-token--selected" role="button" tabindex="0">
|
|
97
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
98
|
+
<button class="fd-token__close" tabindex="-1" aria-label="Bibendum token close"></button>
|
|
99
|
+
</span>
|
|
100
|
+
</div>
|
|
101
|
+
<div class="docs-tokens-container">
|
|
102
|
+
<div>Hover</div>
|
|
103
|
+
<span class="fd-token is-hover" role="button" tabindex="0">
|
|
104
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
105
|
+
<button class="fd-token__close" tabindex="-1" aria-label="Bibendum token close"></button>
|
|
106
|
+
</span>
|
|
107
|
+
<span class="fd-token fd-token--selected is-hover" role="button" tabindex="0">
|
|
108
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
109
|
+
<button class="fd-token__close" tabindex="-1" aria-label="Bibendum token close"></button>
|
|
110
|
+
</span>
|
|
111
|
+
</div>
|
|
112
|
+
<div class="docs-tokens-container">
|
|
113
|
+
<div>Focus</div>
|
|
114
|
+
<span class="fd-token is-focus" role="button" tabindex="0">
|
|
115
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
116
|
+
<button class="fd-token__close" tabindex="-1" aria-label="Bibendum token close"></button>
|
|
117
|
+
</span>
|
|
118
|
+
<span class="fd-token fd-token--selected is-focus" role="button" tabindex="0">
|
|
119
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
120
|
+
<button class="fd-token__close" tabindex="-1" aria-label="Bibendum token close"></button>
|
|
121
|
+
</span>
|
|
122
|
+
</div>
|
|
123
|
+
<div class="docs-tokens-container">
|
|
124
|
+
<div>Hover&Focus</div>
|
|
125
|
+
<span class="fd-token is-hover is-focus" role="button" tabindex="0">
|
|
126
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
127
|
+
<button class="fd-token__close" tabindex="-1" aria-label="Bibendum token close"></button>
|
|
128
|
+
</span>
|
|
129
|
+
<span class="fd-token fd-token--selected is-hover is-focus" role="button" tabindex="0">
|
|
130
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
131
|
+
<button class="fd-token__close" tabindex="-1" aria-label="Bibendum token close"></button>
|
|
132
|
+
</span>
|
|
133
|
+
</div>
|
|
134
|
+
<div class="docs-tokens-container">
|
|
135
|
+
<div>Read-only</div>
|
|
136
|
+
<span class="fd-token fd-token--readonly" role="button" tabindex="0">
|
|
137
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
138
|
+
</span>
|
|
139
|
+
<span></span>
|
|
140
|
+
<!-- <span class="fd-token fd-token--selected fd-token--readonly" role="button" tabindex="0">
|
|
141
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
142
|
+
</span> -->
|
|
143
|
+
</div>
|
|
144
|
+
<div class="docs-tokens-container">
|
|
145
|
+
<div>Display-only</div>
|
|
146
|
+
<span class="fd-token fd-token--display" role="presentation" tabindex="0">
|
|
147
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
148
|
+
</span>
|
|
149
|
+
<span></span>
|
|
150
|
+
</div>
|
|
151
|
+
</section>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Modifiers
|
|
155
|
+
|
|
156
|
+
| Class | Description |
|
|
157
|
+
|-------|-------------|
|
|
158
|
+
| `fd-token--display` | The default token is displayed in grey with text, and a close button that will remove the token when selected |
|
|
159
|
+
| `fd-token--readonly` | Style variant |
|
|
160
|
+
| `fd-token--selected` | The default token is displayed in grey with text, and a close button that will remove the token when selected |
|
|
161
|
+
|
|
162
|
+
## States
|
|
163
|
+
|
|
164
|
+
| Class | Description |
|
|
165
|
+
|-------|-------------|
|
|
166
|
+
| `is-focus` | Focus state |
|
|
167
|
+
| `is-hover` | Hover state |
|
|
168
|
+
|
|
169
|
+
## BEM Elements
|
|
170
|
+
|
|
171
|
+
This component uses the following BEM elements:
|
|
172
|
+
|
|
173
|
+
- `fd-token__close`
|
|
174
|
+
- `fd-token__text`
|
|
175
|
+
|
|
176
|
+
## Related Components
|
|
177
|
+
|
|
178
|
+
This component works with or depends on:
|
|
179
|
+
|
|
180
|
+
- `input`
|
|
181
|
+
- `token`
|
|
182
|
+
|
|
183
|
+
## Design Tokens
|
|
184
|
+
|
|
185
|
+
Key CSS variables used by this component:
|
|
186
|
+
|
|
187
|
+
- `--disabled`
|
|
188
|
+
- `--display`
|
|
189
|
+
- `--fdToken_Background_Color`
|
|
190
|
+
- `--fdToken_Background_Color_Hover`
|
|
191
|
+
- `--fdToken_Background_Color_Read_Only`
|
|
192
|
+
- `--fdToken_Border`
|
|
193
|
+
- `--fdToken_Border_Color_Hover`
|
|
194
|
+
- `--fdToken_Border_Color_Read_Only`
|
|
195
|
+
- `--fdToken_Border_Color_Selected_Focus`
|
|
196
|
+
- `--fdToken_Border_Radius`
|
|
197
|
+
- `--fdToken_Close_Color`
|
|
198
|
+
- `--fdToken_Close_Padding_Block`
|
|
199
|
+
- `--fdToken_Close_Padding_Inline`
|
|
200
|
+
- `--fdToken_Close_Width`
|
|
201
|
+
- `--fdToken_Focus_Border_Radius`
|
|
202
|
+
|
|
203
|
+
*...and 5 more*
|
|
204
|
+
|
|
205
|
+
## Examples
|
|
206
|
+
|
|
207
|
+
### Tokens
|
|
208
|
+
|
|
209
|
+
The default token is displayed in grey with text, and a close button that will remove the token when selected. It is displayed in cozy mode, which is ideal for mobile and tablet screens.
|
|
210
|
+
|
|
211
|
+
```html
|
|
212
|
+
<style>
|
|
213
|
+
.docs-tokens {
|
|
214
|
+
width: 100%;
|
|
215
|
+
}
|
|
216
|
+
.docs_tokens_item_wrapper {
|
|
217
|
+
display: flex;
|
|
218
|
+
}
|
|
219
|
+
.docs-tokens-container {
|
|
220
|
+
display: grid;
|
|
221
|
+
grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
|
|
222
|
+
column-gap: 0.1rem;
|
|
223
|
+
row-gap: 0.1rem;
|
|
224
|
+
padding: 1rem;
|
|
225
|
+
justify-items: right;
|
|
226
|
+
align-items: center;
|
|
227
|
+
}
|
|
228
|
+
</style>
|
|
229
|
+
|
|
230
|
+
<section class="docs-tokens">
|
|
231
|
+
<div class="docs-tokens-container">
|
|
232
|
+
|
|
233
|
+
<div>Regular</div>
|
|
234
|
+
<div>Selected</div>
|
|
235
|
+
</div>
|
|
236
|
+
<div class="docs-tokens-container">
|
|
237
|
+
<div>Normal</div>
|
|
238
|
+
<span class="fd-token" role="button" tabindex="0">
|
|
239
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
240
|
+
<button class="fd-token__close" tabindex="-1" aria-label="Bibendum token close"></button>
|
|
241
|
+
</span>
|
|
242
|
+
<span class="fd-token fd-token--selected" role="button" tabindex="0">
|
|
243
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
244
|
+
<button class="fd-token__close" tabindex="-1" aria-label="Bibendum token close"></button>
|
|
245
|
+
</span>
|
|
246
|
+
</div>
|
|
247
|
+
<div class="docs-tokens-container">
|
|
248
|
+
<div>Hover</div>
|
|
249
|
+
<span class="fd-token is-hover" role="button" tabindex="0">
|
|
250
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
251
|
+
<button class="fd-token__close" tabindex="-1" aria-label="Bibendum token close"></button>
|
|
252
|
+
</span>
|
|
253
|
+
<span class="fd-token fd-token--selected is-hover" role="button" tabindex="0">
|
|
254
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
255
|
+
<button class="fd-token__close" tabindex="-1" aria-label="Bibendum token close"></button>
|
|
256
|
+
</span>
|
|
257
|
+
</div>
|
|
258
|
+
<div class="docs-tokens-container">
|
|
259
|
+
<div>Focus</div>
|
|
260
|
+
<span class="fd-token is-focus" role="button" tabindex="0">
|
|
261
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
262
|
+
<button class="fd-token__close" tabindex="-1" aria-label="Bibendum token close"></button>
|
|
263
|
+
</span>
|
|
264
|
+
<span class="fd-token fd-token--selected is-focus" role="button" tabindex="0">
|
|
265
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
266
|
+
<button class="fd-token__close" tabindex="-1" aria-label="Bibendum token close"></button>
|
|
267
|
+
</span>
|
|
268
|
+
</div>
|
|
269
|
+
<div class="docs-tokens-container">
|
|
270
|
+
<div>Hover&Focus</div>
|
|
271
|
+
<span class="fd-token is-hover is-focus" role="button" tabindex="0">
|
|
272
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
273
|
+
<button class="fd-token__close" tabindex="-1" aria-label="Bibendum token close"></button>
|
|
274
|
+
</span>
|
|
275
|
+
<span class="fd-token fd-token--selected is-hover is-focus" role="button" tabindex="0">
|
|
276
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
277
|
+
<button class="fd-token__close" tabindex="-1" aria-label="Bibendum token close"></button>
|
|
278
|
+
</span>
|
|
279
|
+
</div>
|
|
280
|
+
<div class="docs-tokens-container">
|
|
281
|
+
<div>Read-only</div>
|
|
282
|
+
<span class="fd-token fd-token--readonly" role="button" tabindex="0">
|
|
283
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
284
|
+
</span>
|
|
285
|
+
<span></span>
|
|
286
|
+
<!-- <span class="fd-token fd-token--selected fd-token--readonly" role="button" tabindex="0">
|
|
287
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
288
|
+
</span> -->
|
|
289
|
+
</div>
|
|
290
|
+
<div class="docs-tokens-container">
|
|
291
|
+
<div>Display-only</div>
|
|
292
|
+
<span class="fd-token fd-token--display" role="presentation" tabindex="0">
|
|
293
|
+
<span class="fd-token__text">tokenopolis</span>
|
|
294
|
+
</span>
|
|
295
|
+
<span></span>
|
|
296
|
+
</div>
|
|
297
|
+
</section>
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
## Accessibility
|
|
301
|
+
|
|
302
|
+
- Use semantic HTML elements where appropriate
|
|
303
|
+
- Include proper ARIA attributes for interactive elements
|
|
304
|
+
- Ensure keyboard navigation support
|
|
305
|
+
- Provide adequate color contrast
|
|
306
|
+
|
|
307
|
+
## Source
|
|
308
|
+
|
|
309
|
+
This documentation was automatically generated from: `packages/styles/stories/Components/token/token.stories.js`
|
|
310
|
+
|
|
311
|
+
For the latest updates and interactive examples, see [Storybook](https://sap.github.io/fundamental-styles/).
|