+
+
+
+ “Ably seamlessly absorbs sudden bursts in load during unexpected
+ client events. The integration was easy and we were live in under a
+ month.”
+
+
+
+
+
+
+
+
{name}
+
+ Co-Founder & Technical Leader
+
+
+
-const Slide = ({ children }: { children: ReactNode }) => (
-
-
{children}
+
+
+
+
Mentimeter
+
+
+
+ Read case study
+
+
+
+
+
+
+
);
const slides = [
-
- Powers live chat, updates, analytics, and composition for millions of users.
- ,
-
- Powers virtual venues for millions of event attendees around the world.
- ,
-
- Provides 5 million daily users with live financial commentary and stock
- tickers.
- ,
-
Monitors live car performance data across the USA.,
+
,
+
,
+
,
+
,
];
-export const SliderOnAllBreakpoints = {
+export default {
+ title: "Components/Slider",
+ component: Slider,
+ args: {
+ children: slides,
+ options: {
+ interval: 10000,
+ intervalIndicator: true,
+ controlPosition: "floating",
+ },
+ },
+};
+
+export const FloatingControlPosition = {
+ args: {
+ children: slides,
+ options: {
+ interval: 10000,
+ intervalIndicator: true,
+ controlPosition: "floating",
+ },
+ },
+};
+
+export const InlineControlPosition = {
args: {
- slides,
+ options: {
+ interval: 10000,
+ intervalIndicator: true,
+ controlPosition: "inline",
+ },
},
};
-export const SliderOnSmallBreakpointOnly = {
+export const WithoutIntervalIndicator = {
args: {
- slides,
- classes: `sm:grid-cols-${slides.length / 2} md:grid-cols-${slides.length}`,
- mqEnableThreshold: () => !window.matchMedia("(min-width: 48rem)").matches,
+ options: {
+ interval: 10000,
+ intervalIndicator: false,
+ controlPosition: "floating",
+ },
},
};
diff --git a/src/core/Slider/component.css b/src/core/Slider/component.css
index 48ea9f48..a43fbab4 100644
--- a/src/core/Slider/component.css
+++ b/src/core/Slider/component.css
@@ -4,3 +4,35 @@
@apply leading-none px-4 relative;
}
+
+@keyframes fillAnimation {
+ 0% {
+ width: 0%;
+ }
+ 100% {
+ width: 100%;
+ }
+}
+
+.ui-icon-cta {
+ @apply cursor-pointer overflow-hidden;
+ @apply rounded border-2 border-mid-grey hover:border-active-orange;
+ transition: all 0.4s;
+}
+
+@screen sm {
+ .ui-icon-cta-left:hover .ui-icon-cta-holder {
+ transform: translateX(-120%);
+ }
+ .ui-icon-cta-right .ui-icon-cta-holder {
+ transform: translateX(-120%);
+ }
+ .ui-icon-cta-right:hover .ui-icon-cta-holder {
+ transform: translateX(0%);
+ }
+}
+
+.ui-icon-cta-holder {
+ @apply w-full h-full;
+ transition: all 0.4s;
+}