1
- [ ![ chrome] ( https://github.com/fuxingloh/vue-horizontal/workflows/chrome/badge.svg )] ( https://github.com/fuxingloh/vue-horizontal/actions?query=workflow%3Achrome+branch%3Amain )
2
- [ ![ firefox] ( https://github.com/fuxingloh/vue-horizontal/workflows/firefox/badge.svg )] ( https://github.com/fuxingloh/vue-horizontal/actions?query=workflow%3Afirefox+branch%3Amain )
3
- [ ![ edge] ( https://github.com/fuxingloh/vue-horizontal/workflows/edge/badge.svg )] ( https://github.com/fuxingloh/vue-horizontal/actions?query=workflow%3Aedge+branch%3Amain )
4
- [ ![ SSR] ( https://github.com/fuxingloh/vue-horizontal/workflows/SSR/badge.svg )] ( https://github.com/fuxingloh/vue-horizontal/actions?query=workflow%3ASSR+branch%3Amain )
5
- [ ![ SSG] ( https://github.com/fuxingloh/vue-horizontal/workflows/SSG/badge.svg )] ( https://github.com/fuxingloh/vue-horizontal/actions?query=workflow%3ASSG+branch%3Amain )
6
- [ ![ License MIT] ( https://img.shields.io/github/license/fuxingloh/vue-horizontal )] ( https://github.com/fuxingloh/vue-horizontal/blob/main/LICENSE )
7
- [ ![ FOSSA Status] ( https://app.fossa.com/api/projects/git%2Bgithub.com%2Ffuxingloh%2Fvue-horizontal.svg?type=shield )] ( https://app.fossa.com/projects/git%2Bgithub.com%2Ffuxingloh%2Fvue-horizontal?ref=badge_shield )
8
-
9
1
# [ Vue Horizontal] ( https://vue-horizontal.fuxing.dev ) [ ![ vue-horizontal] ( https://img.shields.io/npm/v/vue-horizontal/latest )] ( https://www.npmjs.com/package/vue-horizontal ) [ ![ vue-horizontal] ( https://img.shields.io/npm/v/vue-horizontal/next )] ( https://www.npmjs.com/package/vue-horizontal )
10
2
11
- Designing your web app for a horizontal experience can tedious and overwhelming if you are new to web development. While
12
- a vertical design comes naturally as html is naturally vertical by design ` display:block ` . With ` display:flex ` , aligning
13
- your content horizontally becomes natural and intuitive but it doesn't support overflow or navigation. You start to add
14
- more hacks and tricks to get the design you wanted, but those hacks are not consistent and cross-browser tested, SSG or
15
- SEO friendly. You get the idea.
16
-
17
- There are many libraries already in open-source world, some using direct DOM manipulation, some importing another legacy
18
- JavaScript or JQuery library. You don't want that. Vue already does that. This is Vue native created for Vue, and only
19
- Vue is the peer dependency required. All modes of rendering (SPA/SSR/SSG) are supported and tested with E2E tools.
3
+ Designing your web app for a horizontal experience can be tedious and overwhelming if you are new to web development.
4
+ While a vertical design comes naturally as html is naturally vertical by design ` display:block ` .
5
+ With ` display:flex ` , aligning your content horizontally becomes natural and intuitive,
6
+ but it doesn't support overflow or navigation.
7
+ You start to add more hacks and tricks to get the design you wanted, but those hacks are not consistent and
8
+ cross-browser tested, SSG or SEO friendly.
9
+ You get the idea.
10
+
11
+ There are many libraries already in an open-source world, some using direct DOM manipulation, some importing another
12
+ legacy JavaScript or JQuery library.
13
+ You don't want that.
14
+ Vue already does that.
15
+ This is Vue native created for Vue, and only Vue is the peer dependency required.
16
+ All modes of rendering (SPA/SSR/SSG) are supported and tested with E2E tools.
20
17
21
18
The actual library is only about 400 LOC while there are at least 100x more LOC in the documentation, end-to-end testing
22
19
and a bunch of other fun stuff.
@@ -31,9 +28,10 @@ and a bunch of other fun stuff.
31
28
- ** SSR/SSG/SPA: all modes of rendering supported**
32
29
- Mobile first for the responsive web
33
30
- Customizable navigation: scroll bar, buttons or basically everything
34
- - UX focused, smooth scrolling, snapping for variety of use case .
31
+ - UX focused, smooth scrolling, snapping for a variety of use cases .
35
32
- Small size of 3 KB for CDN users
36
- - Highly extensible for any use case with [ well documented recipes] ( https://vue-horizontal.fuxing.dev/design/principles ) .
33
+ - Highly extensible for any use case
34
+ with [ well documented recipes] ( https://vue-horizontal.fuxing.dev/design/principles ) .
37
35
- You control how to structure your content with HTML
38
36
- You control how it looks with CSS
39
37
- You control how to navigate your layout with Vue.js
@@ -140,23 +138,19 @@ section {
140
138
141
139
### [ CSS Scroll Behavior: Smooth] ( https://vue-horizontal.fuxing.dev/limitations#css-scroll-behavior-smooth )
142
140
143
- In Vue Horizontal, smooth scrolling is enabled by default. With scroll-behavior: smooth, it enables smooth scrolling
141
+ In Vue Horizontal, smooth scrolling is enabled by default. With ` scroll-behavior: smooth ` , it enables smooth scrolling
144
142
experience when scroll event is triggered by programmatic calls. Although this is not a breaking functional feature, it
145
- provides a "smooth" scrolling user experience.
143
+ provides a ** "smooth"** scrolling user experience.
146
144
147
- As of December 2020, there is only a 76% cross browser compatibility (88% if you include Safari experimental feature
148
- flag). Meantime you should polyfill this feature with more
149
- [ information provided here] ( https://vue-horizontal.fuxing.dev/limitations#smoothscroll-polyfill ) . Polyfill should be
150
- done by the user, there are no plans to incorporate this natively in the library.
145
+ As of December 2023, there is a 96% cross-browser compatibility.
151
146
152
147
### [ CSS Scroll Snap] ( https://vue-horizontal.fuxing.dev/limitations#css-scroll-snap )
153
148
154
149
Scroll snap align or scroll-snapping, is a CSS technique that allows customizable scrolling experiences like pagination
155
- of carousels by setting defined snap positions. Vue Horizontal has it enabled by default, to disable you can set
156
- ` <vue-horizontal snap="none"> ` .
150
+ of carousels by setting defined snap positions. Vue Horizontal has it enabled by default to disable you can
151
+ set ` <vue-horizontal snap="none"> ` .
157
152
158
- As of December 2020, there is a ** 94%+** cross browser compatibility. You can choose to polyfill this, but it's more of
159
- an aesthetic feature rather than a breaking functional requirement.
153
+ As of December 2023, there is a 98% cross-browser compatibility.
160
154
161
155
## Development
162
156
@@ -170,11 +164,11 @@ npm run cypress:run # e2e testing
170
164
171
165
- End-to-end test cases are also written because of the UI nature of this framework.
172
166
[ Cypress] ( https://www.cypress.io/ ) is used under the hood.
173
- - There are also additional integration testing done to ensure SSR and SSG works.
167
+ - There is also additional integration testing done to ensure SSR and SSG works.
174
168
175
169
## Contributions
176
170
177
- - For any question or feature request please feel free to create
171
+ - For any question or feature request, please feel free to create
178
172
an [ issue] ( https://github.com/fuxingloh/vue-horizontal/issues/new )
179
173
or [ pull request] ( https://github.com/fuxingloh/vue-horizontal/pulls ) .
180
174
- For feature request, do check out the examples as some of them might have been implemented.
@@ -194,4 +188,5 @@ This project is another take on it with an ultra simple implementation that is e
194
188
to the user rather than the library.
195
189
196
190
## License
191
+
197
192
[ ![ FOSSA Status] ( https://app.fossa.com/api/projects/git%2Bgithub.com%2Ffuxingloh%2Fvue-horizontal.svg?type=large )] ( https://app.fossa.com/projects/git%2Bgithub.com%2Ffuxingloh%2Fvue-horizontal?ref=badge_large )
0 commit comments