### Basic InputSlider Example Source: https://github.com/raiffeisen-dgtl/viennaui/blob/master/src/InputSlider/README.md A basic example of the InputSlider component with predefined tags for values. It demonstrates how to set initial values and display currency. ```jsx () => { const [value, setValue] = React.useState(50); const changeHandler = (e) => { setValue(parseInt(e) || 0); }; return ( 0 $ 50 $ 100 $ ); } ``` -------------------------------- ### Install ViennaUI Components Source: https://github.com/raiffeisen-dgtl/viennaui/blob/master/README.md Installs the main ViennaUI React components library using either npm or yarn package managers. ```bash $ npm i vienna-ui $ yarn add vienna-ui ``` -------------------------------- ### Install Specific ViennaUI Packages Source: https://github.com/raiffeisen-dgtl/viennaui/blob/master/README.md Installs individual packages from the ViennaUI ecosystem, such as icons, tokens, or utility functions. ```bash $ npm i $ yarn add ``` -------------------------------- ### Grid Layout Examples Source: https://github.com/raiffeisen-dgtl/viennaui/blob/master/src/Grid/README.md Provides various examples of Grid layouts, showcasing different column distributions (12 columns, halves, thirds, quarters). ```jsx 1 1 1 1 1 1 1 1 1 1 1 1 One of two columns One of two columns One of three columns One of three columns One of three columns One of four columns One of four columns One of four columns One of four columns ``` -------------------------------- ### Basic CssGrid Usage Example Source: https://github.com/raiffeisen-dgtl/viennaui/blob/master/src/CssGrid/README.md An example of using the CssGrid component to create a grid layout with specified rows and columns, populating it with child elements. ```html 1 2 3 4 5 6 7 8 9 ``` -------------------------------- ### CardVersatile Component Usage Example Source: https://github.com/raiffeisen-dgtl/viennaui/blob/master/src/CardVersatile/README.md A comprehensive example showcasing the usage of the CardVersatile component with various properties like title, icon, counter, hint, badge, extraText, subtitle, and info. ```jsx Some text ``` -------------------------------- ### Interactive Example with Custom Buttons Source: https://github.com/raiffeisen-dgtl/viennaui/blob/master/src/MultiselectWithSearch/README.md Provides an interactive example showcasing custom 'Select All' and 'Clear' buttons alongside the MultiselectWithSearch component. It demonstrates how to manage the state and trigger actions for selecting or clearing all options. ```jsx { const [state, setValue] = React.useState({ values: [] }); const handleSelect = (data) => setValue({ values: data.value }); const checkAll = () => setValue({ values: ['Значение 1', 'Значение большое 2', 'Значение еще больше 3', 'Знач. 4', 'Значение 5'] }); const uncheckAll = () => setValue({ values: [] }); return (
Значение 1 Значение большое 2 Значение еще больше 3 Знач. 4 Значение 5
); } ``` -------------------------------- ### IconContainer Basic Usage Source: https://github.com/raiffeisen-dgtl/viennaui/blob/master/src/IconContainer/README.md Shows basic examples of using the IconContainer with text, an image, and an icon. ```javascript M Аватар ``` -------------------------------- ### Viennaui Tour Component Usage Example (React) Source: https://github.com/raiffeisen-dgtl/viennaui/blob/master/src/Tour/README.md A comprehensive example demonstrating the integration and usage of the Viennaui Tour component within a React application. It showcases how to define tour steps, manage tour visibility, and pass custom `testId` props. ```javascript { const [showModal, setShowModal] = React.useState(false); const [showTour, setShowTour] = React.useState(false); const show = () => setShowTour(true); const steps = [ { selector: '.start-tour4', highlightedSelectors: [], type: 'accent', content: { title: 'Начнем знакомиться?', description: 'Это accent', }, backButtonText: 'Позже', nextButtonText: 'Начнем', }, { selector: '.fist-step4', content: { title: 'Title 1', description: 'description 1', image: 'https://insider-test.raiffeisen.ru/uploads/article/11320/previews/detail.jpg?1725975927224' }, maskRadius: 8, onEnter: () => console.log('ENTER'), onLeave: () => console.log('LEAVE'), }, { selector: '.second-step4', content: { title: 'Title 2', description: 'description 2' }, maskRadius: 8, position: 'right' }, { selector: '.third-step4', type: 'accent', content: { title: 'Title 3', description: 'description 3' }, position: 'left', }, { selector: '.fourth-step4', content: { title: 'Title 4', description: 'description 4' }, position: 'bottom', onLeave: ({ nextStep }) => { if (nextStep === 5) { setShowTour(false); setShowModal(true); } }, }, { selector: '.fifth-step4', content: { title: 'Title 5', description: 'description 5' }, position: 'left', onLeave: ({ nextStep }) => { if (nextStep === 5) { setShowTour(false); setShowModal(true); } }, }, { selector: '.fifth-step4', content: { title: 'Title 5', description: 'description 5' }, position: 'left', onLeave: ({ nextStep }) => { if (nextStep === 5) { setShowTour(false); setShowModal(true); } }, }, ]; return (
setShowTour(val)} beforeClose={() => console.log('beforeClose')} afterOpen={() => console.log('afterOpen')} />
); } ``` -------------------------------- ### ComboButton Usage Examples Source: https://github.com/raiffeisen-dgtl/viennaui/blob/master/src/ComboButton/README.md Provides examples of using the ComboButton component with different designs and configurations, including single-button and double-button variants. It showcases how to define options and integrate with Button components. ```javascript { const options = [ console.log(e.target)} key={1}> Option 1 , console.log(e.target)} key={2}> Option 2 , console.log(e.target)} key={3}> Option 3 , ]; return ( ); } ``` ```javascript { const options = [ Option 1, Option 2, Option 3, Option 4, Option 5, ]; return ( ); } ``` ```javascript { const options = [ Option 1, Option 2, Option 3, Option 4, Option 5, ]; return ( setOpen(false)}> Enter SMS-code Drawer SubHeader Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Amet cursus sit amet dictum sit amet justo donec enim. Sit amet porttitor eget dolor morbi non. Ipsum consequat nisl vel pretium lectus quam id leo in. Duis ut diam quam nulla porttitor massa. Id volutpat lacus laoreet non. Etiam non quam lacus suspendisse faucibus. Mollis aliquam ut porttitor leo a diam. Auctor urna nunc id cursus metus aliquam. In dictum non consectetur a erat nam at lectus. Facilisi cras fermentum odio eu feugiat. Risus commodo viverra maecenas accumsan. Interdum velit euismod in pellentesque massa placerat duis ultricies. Ac ut consequat semper viverra nam libero justo. Dapibus ultrices in iaculis nunc sed augue lacus viverra. ); } } ``` -------------------------------- ### Alarm Component Usage Example Source: https://github.com/raiffeisen-dgtl/viennaui/blob/master/src/Alarm/READMEENG.md Demonstrates how to use the Alarm component with a 'success' design. ```jsx ``` -------------------------------- ### React Usage Example for Viennaui Drawer Source: https://github.com/raiffeisen-dgtl/viennaui/blob/master/src/Drawer/README.md A complete React example showcasing the integration of the Viennaui Drawer component. It includes state management for drawer visibility, passing custom `testId` props, and structuring content within the Drawer's layout, header, body, and footer. ```javascript { () => { const [isOpen, setOpen] = React.useState(false); return ( <> setOpen(false)} testId={{ btnClose: 'btnClose', overlay: 'overlay' }}> Enter SMS-code Drawer SubHeader Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Amet cursus sit amet dictum sit amet justo donec enim. Sit amet porttitor eget dolor morbi non. Ipsum consequat nisl vel pretium lectus quam id leo in. Duis ut diam quam nulla porttitor massa. Id volutpat lacus laoreet non. Etiam non quam lacus suspendisse faucibus. Mollis aliquam ut porttitor leo a diam. Auctor urna nunc id cursus metus aliquam. In dictum non consectetur a erat nam at lectus. Facilisi cras fermentum odio eu feugiat. Risus commodo viverra maecenas accumsan. Interdum velit euismod in pellentesque massa placerat duis ultricies. Ac ut consequat semper viverra nam libero justo. Dapibus ultrices in iaculis nunc sed augue lacus viverra. ); } } ``` -------------------------------- ### Basic Textarea Usage Source: https://github.com/raiffeisen-dgtl/viennaui/blob/master/src/Textarea/README.md Shows a basic example of using the Textarea component with a placeholder. ```javascript