Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch #1216

Merged
merged 186 commits into from
Oct 6, 2023
Merged

Patch #1216

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
d07f89a
feat: chnages done
makkarMeenu Sep 20, 2023
05dead4
Merge pull request #1146 from gluestack/patch
amars29 Sep 21, 2023
b76684e
feat: fixed imports and exports in component styles
Sep 22, 2023
089c34f
fix: focus ring issues
DaminiPandey Sep 22, 2023
a351f4a
Merge branch 'documentation' of https://github.com/gluestack/gluestac…
DaminiPandey Sep 22, 2023
f49ad13
refactor: use absolute values
DaminiPandey Sep 22, 2023
37cf669
Merge pull request #1149 from gluestack/fix/focus-rings
amars29 Sep 22, 2023
b65fc3f
Update index.stories.mdx
Randall71 Sep 24, 2023
f9334d6
v0.1.46-alpha.0
ankit-tailor Sep 25, 2023
5e4f30e
Merge pull request #1158 from Randall71/patch-1
makkarMeenu Sep 26, 2023
69a180a
feat: ejectable themes
ankit-tailor Sep 26, 2023
09046f6
fix: removed animations
ankit-tailor Sep 26, 2023
0f6955f
Update index.stories.mdx
akash3gtm Sep 27, 2023
3bac916
Merge pull request #1176 from gluestack/akash3gtm-patch-1
akash3gtm Sep 27, 2023
c9f94d8
fix: animation components
ankit-tailor Sep 28, 2023
3e8a747
v0.1.46-alpha.2
ankit-tailor Sep 28, 2023
4cb5a4c
fix: icon typing fixes
Sep 28, 2023
4794617
fix: merge conflict resolved
Sep 28, 2023
afec8d4
fix: modified button
Sep 28, 2023
b94dc35
fix: merge conflict resolved
Sep 28, 2023
9e27922
Merge branch 'feat/theme-export-folder' of github.com:gluestack/glues…
ankit-tailor Sep 28, 2023
c12dc55
fix: tree shake config and compnents
ankit-tailor Sep 28, 2023
32e7e76
fix: version updated
Sep 28, 2023
3927c02
v0.2.0-alpha.0
Sep 28, 2023
f578bfb
fix: update links
DaminiPandey Sep 29, 2023
03286d3
fix: links
DaminiPandey Sep 29, 2023
ae68a8f
v0.1.55-alpha.0
ankit-tailor Sep 29, 2023
da830e1
feat: themed components
ankit-tailor Sep 29, 2023
18a88a9
fix: merge conflict resolved
Sep 29, 2023
3366bd1
fix: version updated
Sep 29, 2023
b958d83
fix: layout and links
DaminiPandey Sep 29, 2023
50a5922
feat: component catalog under overview section
DaminiPandey Sep 29, 2023
184b2ee
Merge pull request #1180 from gluestack/fix/getting-started
amars29 Sep 29, 2023
68aa8e2
feat: initial commit
DaminiPandey Oct 3, 2023
3174e59
fix: broken links
DaminiPandey Oct 3, 2023
64c8101
fix: link
DaminiPandey Oct 3, 2023
d245abc
fix: revert change
DaminiPandey Oct 3, 2023
a0687c2
v0.1.0
Oct 3, 2023
e1e319c
fix: added config package
Oct 3, 2023
963a71c
fix: broken links
DaminiPandey Oct 3, 2023
d7e1243
fix: broken links
DaminiPandey Oct 3, 2023
832af3a
fix: update relative links
DaminiPandey Oct 3, 2023
981120a
feat: update broken links
DaminiPandey Oct 3, 2023
ca57eb7
fix: remove gluestack theme from themed
ankit-tailor Oct 3, 2023
06f1a67
chore: themed alpha release
ankit-tailor Oct 3, 2023
61cdc77
Merge branch 'patch' of github.com:gluestack/gluestack-ui into fix/do…
Viraj-10 Oct 3, 2023
4e95278
fix: broken links
DaminiPandey Oct 3, 2023
e98535f
feat: new docs format
Viraj-10 Oct 3, 2023
790f3f2
fix: args of default story
Viraj-10 Oct 3, 2023
fd78390
fix: header and content
Viraj-10 Oct 3, 2023
38b08bf
fix: links
DaminiPandey Oct 3, 2023
b8f04b7
fix: order of unstly and themed
Viraj-10 Oct 3, 2023
426299a
Merge pull request #1186 from gluestack/fix/links
amars29 Oct 3, 2023
936a1d7
fix: added themed description
Viraj-10 Oct 3, 2023
9b1fa69
v0.2.0-alpha.2
ankit-tailor Oct 3, 2023
18eee70
Merge pull request #1190 from gluestack/patch
amars29 Oct 3, 2023
33cade5
Merge pull request #1191 from gluestack/patch
makkarMeenu Oct 3, 2023
ca2b5db
fix: new docs layout
Viraj-10 Oct 3, 2023
acc9cf2
fix: action type fix
Viraj-10 Oct 3, 2023
e9b6d5d
fix: example args revert
Viraj-10 Oct 3, 2023
eaf08bd
feat: checkbox docs changes
Viraj-10 Oct 3, 2023
aa0eb7e
fix: revert args checkbox
Viraj-10 Oct 3, 2023
726d43b
fix: alert dialog component
mayank-96 Oct 3, 2023
ca409f2
fix: alert dialog component
mayank-96 Oct 3, 2023
29974dc
fix: menu component
mayank-96 Oct 3, 2023
480cb2a
feat: form control documentation
Viraj-10 Oct 3, 2023
005630a
fix: revert args formcontrol
Viraj-10 Oct 3, 2023
2590cc1
fix: modal component
mayank-96 Oct 3, 2023
818244f
v0.2.0-alpha.3
ankit-tailor Oct 3, 2023
6439592
fix: popover component
mayank-96 Oct 3, 2023
ccff482
feat: input update docs and removed dependacy section
Viraj-10 Oct 3, 2023
0d209b8
fix: tooltip component
mayank-96 Oct 3, 2023
8839fde
feat: link documentation update
Viraj-10 Oct 3, 2023
e46ed69
fix: header h3 for next link
Viraj-10 Oct 3, 2023
84652bc
feat: pressable docs update
Viraj-10 Oct 3, 2023
8653f8c
fix: added themed description input
Viraj-10 Oct 3, 2023
fbc13cd
feat: radio docs update
Viraj-10 Oct 3, 2023
a2c3e95
fix: divider and badge component
mayank-96 Oct 3, 2023
054936b
feat: select component name changes and docs update
Viraj-10 Oct 3, 2023
91b6def
fix: slider and switch
Viraj-10 Oct 3, 2023
6e9ebd1
feat: textarea docs update
Viraj-10 Oct 3, 2023
973ee5f
fix: typography and feedback components
mayank-96 Oct 3, 2023
b4eb67f
feat: actionsheet docs and icon descendant
Viraj-10 Oct 3, 2023
88151a8
feat: box docs update
Viraj-10 Oct 3, 2023
31f1c18
fix: heading default component
Oct 4, 2023
a2841c0
Merge branch 'feat/theme-export-folder' of github.com:gluestack/glues…
Oct 4, 2023
3ecac91
v0.2.0-alpha.4
Oct 4, 2023
479200f
fix: version updated
Oct 4, 2023
d1a278c
v0.2.0-alpha.5
Oct 4, 2023
1aaf7d6
fix: version updated
Oct 4, 2023
7e1f079
v0.2.0-alpha.7
Oct 4, 2023
3d8e682
fix: version updated
Oct 4, 2023
e8742c6
v0.1.1
Oct 4, 2023
77c8192
v0.2.0-alpha.8
Oct 4, 2023
8598615
feat: center and hstack docs update
Viraj-10 Oct 4, 2023
ebb7cd1
fix: image, icon, avatar
mayank-96 Oct 4, 2023
cb904dc
fix: vstack
mayank-96 Oct 4, 2023
a280694
fix: hstack and slider props
Viraj-10 Oct 4, 2023
fc39c25
fix: changes
mayank-96 Oct 4, 2023
0f9719c
Merge pull request #1195 from gluestack/feat/overlay
Viraj-10 Oct 4, 2023
3bd2780
Merge pull request #1196 from gluestack/feat/data-display
Viraj-10 Oct 4, 2023
0e049c9
Merge pull request #1197 from gluestack/feat/feedback-and-typography
Viraj-10 Oct 4, 2023
df1b4b4
Merge pull request #1198 from gluestack/feat/media-and-icons
Viraj-10 Oct 4, 2023
10b92b1
Merge pull request #1199 from gluestack/feat/layout
Viraj-10 Oct 4, 2023
58a4d71
fix: added selectedLabel prop
Viraj-10 Oct 4, 2023
2bcc86c
Merge branch 'fix/documentation-patch' of github.com:gluestack/gluest…
Viraj-10 Oct 4, 2023
31a299c
fix: merge conflicts
Viraj-10 Oct 4, 2023
014d833
fix: docs
ankit-tailor Oct 4, 2023
dd27fb0
Merge branch 'feat/theme-export-folder' of github.com:gluestack/glues…
ankit-tailor Oct 4, 2023
cc64f50
v0.2.0-alpha.9
Oct 4, 2023
c8ea549
v0.1.2
Oct 4, 2023
41705ed
fix: version updated
Oct 4, 2023
57625f2
v0.2.0-alpha.10
Oct 4, 2023
dbd1e05
fix: merge conflict resolved
Oct 4, 2023
69d5bed
fix: renaming component catalog
Viraj-10 Oct 4, 2023
b62c204
fix: documentation changes
mayank-96 Oct 4, 2023
f2aeab2
fix: documentation changes
mayank-96 Oct 4, 2023
11dfd2e
Merge branch 'feat/styling-docs' of github.com:gluestack/gluestack-ui…
mayank-96 Oct 4, 2023
4faca0a
fix: documentation changes
mayank-96 Oct 4, 2023
4be2661
feat: added configuration theme
Viraj-10 Oct 4, 2023
0c6ef16
fix: merge conflicts
Viraj-10 Oct 4, 2023
06b7063
fix: customize theme
Viraj-10 Oct 5, 2023
9e68e5b
fix: included src in npm
Viraj-10 Oct 5, 2023
82178bc
v0.1.3
Viraj-10 Oct 5, 2023
566f9da
v0.1.4
Viraj-10 Oct 5, 2023
0e9b697
v0.2.0-alpha.11
ankit-tailor Oct 5, 2023
ddc570a
v0.1.3-alpha.0
ankit-tailor Oct 5, 2023
5894df5
fix: version updated
Oct 5, 2023
ee385ba
v0.2.0-alpha.12
Oct 5, 2023
0cbc346
fix: merge conflict resolved
Oct 5, 2023
b1b89e7
fix: customize theme
Viraj-10 Oct 5, 2023
35d3951
Merge branch 'feat/theme-export-folder' of github.com:gluestack/glues…
Viraj-10 Oct 5, 2023
73761f1
fix: customize theme
Viraj-10 Oct 5, 2023
35d580f
fix: config type extention
ankit-tailor Oct 5, 2023
6442f41
Merge branch 'feat/theme-export-folder' of github.com:gluestack/glues…
ankit-tailor Oct 5, 2023
3f26d44
Merge pull request #1207 from gluestack/main
makkarMeenu Oct 5, 2023
55045ab
fix: theme-exports
rayan1810 Oct 5, 2023
91f40f5
Merge branch 'feat/theme-export-folder' of github.com:gluestack/glues…
rayan1810 Oct 5, 2023
0850624
fix: merge conflict resolved
Oct 5, 2023
5ca2e1a
fix: merge conflict resolved
Oct 5, 2023
a4c3c4f
fix: merge conflict resolved
Oct 5, 2023
7cd5cb3
fix: gluestack style version bump
ankit-tailor Oct 5, 2023
ca3c463
Merge branch 'feat/theme-export-folder' of github.com:gluestack/glues…
ankit-tailor Oct 5, 2023
6ce4ffe
v1.0.0-alpha.0
ankit-tailor Oct 5, 2023
26f5df8
fix: aplha releae
ankit-tailor Oct 5, 2023
3460872
Merge branch 'feat/theme-export-folder' of github.com:gluestack/glues…
rayan1810 Oct 5, 2023
459575c
fix: style links
amars29 Oct 5, 2023
3610c97
Merge pull request #1208 from gluestack/fix/style-link
amars29 Oct 5, 2023
68ec43e
feat: animation customization section
rayan1810 Oct 5, 2023
a4b62ad
Merge branch 'feat/theme-export-folder' of github.com:gluestack/glues…
mayank-96 Oct 5, 2023
29ce6d5
Merge pull request #1202 from gluestack/feat/styling-docs
ankit-tailor Oct 5, 2023
46e2856
fix: content updated
Oct 5, 2023
3b88715
Merge branch 'feat/theme-export-folder' of github.com:gluestack/glues…
Oct 5, 2023
7503cb3
fix: react native borken componenrt
ankit-tailor Oct 5, 2023
11ea5fb
Merge branch 'feat/theme-export-folder' of github.com:gluestack/glues…
ankit-tailor Oct 5, 2023
fce94b0
Merge branch 'patch' of github.com:gluestack/gluestack-ui into feat/t…
ankit-tailor Oct 5, 2023
a7211fb
fix: babel plugin docs
ankit-tailor Oct 5, 2023
49fb0f7
feat: lock update
mayank-96 Oct 5, 2023
f56ef37
Merge branch 'feat/theme-export-folder' of github.com:gluestack/glues…
mayank-96 Oct 5, 2023
7d1675a
fix: doc changes
mayank-96 Oct 5, 2023
e8dd71d
fix: docs themed and unstyled
Viraj-10 Oct 5, 2023
8862f1d
Merge branch 'feat/theme-export-folder' of github.com:gluestack/glues…
Viraj-10 Oct 5, 2023
99feb05
Merge pull request #1209 from gluestack/fix/changes-doc
ankit-tailor Oct 5, 2023
c6d8e61
feat: animation customization section
rayan1810 Oct 5, 2023
884e523
feat: docs changes
Oct 5, 2023
1a81f21
Merge branch 'feat/theme-export-folder' of github.com:gluestack/glues…
rayan1810 Oct 5, 2023
41158b5
feat: docs
Oct 5, 2023
2176c75
fix: installation
ankit-tailor Oct 5, 2023
dcc87fb
Merge branch 'feat/theme-export-folder' of github.com:gluestack/glues…
ankit-tailor Oct 5, 2023
1450d80
Merge pull request #1210 from gluestack/feat/docs-changes
ankit-tailor Oct 5, 2023
960b1a5
fix: actionsheet docs
ankit-tailor Oct 5, 2023
49f752b
fix: content
Oct 6, 2023
99e5f4e
fix: customize theme eject script
Viraj-10 Oct 6, 2023
b808468
fix: all components and description?
Viraj-10 Oct 6, 2023
2002b4d
fix: all components
Viraj-10 Oct 6, 2023
918a736
fix: all components title
Viraj-10 Oct 6, 2023
8a6d180
fix: animate presence API
ankit-tailor Oct 6, 2023
0ac340c
Merge branch 'feat/theme-export-folder' of github.com:gluestack/glues…
ankit-tailor Oct 6, 2023
e925be8
fix: alpha version
ankit-tailor Oct 6, 2023
ecafde9
fix: minor content changes
Oct 6, 2023
46c87bc
Merge branch 'feat/theme-export-folder' of github.com:gluestack/glues…
Oct 6, 2023
73168de
Merge pull request #1136 from gluestack/feat/theme-export-folder
surajahmed Oct 6, 2023
621aaf2
fix: version updated
Oct 6, 2023
97bd7c3
v1.0.1
Oct 6, 2023
90cb95f
fix: docs improvement
Oct 6, 2023
18ee7c6
fix: docs improvement
Oct 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion example/expo-project/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ TempProvider.displayName = 'Provider';

export const Provider = ({ children }: any) => {
return (
<TempProvider config={config.theme}>
<TempProvider config={config}>
<Box
sx={{
_dark: {
Expand Down
2 changes: 1 addition & 1 deletion example/next-project/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { config } from '../../storybook/src/gluestack-ui.config';

export default function App({ Component, pageProps }: AppProps) {
return (
<GluestackUIProvider config={config.theme}>
<GluestackUIProvider config={config}>
<Component {...pageProps} />
</GluestackUIProvider>
);
Expand Down
15 changes: 8 additions & 7 deletions example/storybook/.ondevice/preview.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { withBackgrounds } from '@storybook/addon-ondevice-backgrounds';
import { addParameters } from '@storybook/client-api';
import { GluestackUIProvider } from '@gluestack-ui/themed';
import { config } from '@gluestack-ui/themed';
import { GluestackUIProvider, Box, VStack } from '@gluestack-ui/themed';
import { config } from '@gluestack-ui/config';

import { useState } from 'react';

// export const decorators = [];
//
export const parameters = {
backgrounds: {
default: 'plain',
Expand Down Expand Up @@ -46,8 +45,10 @@ export const decorators = [
}
}
return (
<GluestackUIProvider config={config.theme}>
<Story />
<GluestackUIProvider config={config}>
<Box flex={1} p="$10">
<Story />
</Box>
</GluestackUIProvider>
);
},
Expand All @@ -74,7 +75,7 @@ addParameters({
}
return (
<DocsContainer context={context}>
<GluestackUIProvider config={config.theme} colorMode={getColorMode()}>
<GluestackUIProvider config={config} colorMode={getColorMode()}>
{children}
</GluestackUIProvider>
</DocsContainer>
Expand Down
5 changes: 3 additions & 2 deletions example/storybook/.storybook/gluestack-ui.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// gluestack-ui.config.ts
import { LinearGradient } from 'expo-linear-gradient';
import { createConfig, config as defaultConfig } from '@gluestack-ui/themed';
import { createConfig } from '@gluestack-ui/themed';
import { config as defaultConfig } from '@gluestack-ui/config';

export const config = createConfig({
...defaultConfig.theme,
...defaultConfig,
components: {
LinearGradient: {
theme: {
Expand Down
1 change: 0 additions & 1 deletion example/storybook/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const path = require('path');

// console.log(path.resolve('../../', 'node_modules/@gluestack-style/react'));
module.exports = {
stories: [
Expand Down
23 changes: 13 additions & 10 deletions example/storybook/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { addParameters } from '@storybook/client-api';
import { DocsContainer } from '@storybook/addon-docs/blocks';
import { config } from '@gluestack-ui/config';
import { Center, GluestackUIProvider } from '@gluestack-ui/themed';
import { config } from './gluestack-ui.config';
import { useState } from 'react';
export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
Expand All @@ -19,19 +19,18 @@ export const parameters = {
method: '',
order: [
'Overview',
['Introduction'],
['Introduction', 'All Components'],
'Getting Started',
['Installation', 'VS Code Extensions'],
'Core Concepts',
['Themed Library', 'Unstyled Components', 'Accessibility'],
['Themed Library', 'Unstyled Library', 'Accessibility'],
'Performance',
['Overview', 'Benchmarks'],
'Theme',
'Theme Configuration',
[
'Overview',
'Default Tokens',
'Customizing Tokens',
'Customizing Components',
'Theme',
['Default Tokens', 'Default Components'],
'Customizing Theme',
],
'Styling',
[
Expand All @@ -46,7 +45,6 @@ export const parameters = {
],
'Components',
[
'Component Catalog',
'Provider',
['GluestackUIProvider'],
'Typography',
Expand Down Expand Up @@ -140,7 +138,11 @@ export const decorators = [
}
}
return (
<GluestackUIProvider config={config} colorMode={getColorMode()}>
<GluestackUIProvider
config={config}
// colorMode={getColorMode()}
// components={components}
>
<Center>
<Story />
</Center>
Expand Down Expand Up @@ -168,6 +170,7 @@ addParameters({
return isDark ? 'dark' : 'light';
}
}

return (
<DocsContainer context={context}>
<GluestackUIProvider config={config} colorMode={getColorMode()}>
Expand Down
27 changes: 23 additions & 4 deletions example/storybook/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const path = require('path');
console.log('herher');
module.exports = function (api) {
api.cache(true);
return {
Expand All @@ -8,10 +9,28 @@ module.exports = function (api) {
? [
'module-resolver',
{
'@gluestack-ui/themed': path.join(
__dirname,
'../../packages/themed/src'
),
alias: {
// '@gluestack-ui/themed': path.join(
// __dirname,
// '../../packages/themed/src'
// ),
// '@gluestack-ui/config': path.join(
// __dirname,
// '../../packages/config/src/gluestack-ui.config'
// ),
// '@gluestack-style/react': path.join(
// __dirname,
// '../../../dank-style/packages/react/src'
// ),
// '@gluestack-style/animation-resolver': path.join(
// __dirname,
// '../../../dank-style/packages/animation-resolver/src'
// ),
// '@gluestack-style/legend-motion-animation-driver': path.join(
// __dirname,
// '../../../dank-style/packages/animation-legend-motion-driver/src'
// ),
},
},
]
: [
Expand Down
6 changes: 3 additions & 3 deletions example/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
"dependencies": {
"@expo/html-elements": "^0.4.2",
"@geometricpanda/storybook-addon-iframe": "^0.2.2",
"@gluestack-style/animation-plugin": "^0.1.11",
"@gluestack-style/react": "^0.2.50",
"@gluestack-ui/themed": "*",
"@gluestack/design-system": "^0.4.70",
"@legendapp/motion": "^2.2.0",
"@react-aria/button": "^3.7.0",
Expand All @@ -49,9 +46,12 @@
"expo-status-bar": "~1.4.2",
"fs": "^0.0.1-security",
"lucide-react-native": "^0.236.0",
"next": "^13.5.3",
"prism-react-renderer": "^1.3.5",
"re-resizable": "^6.9.11",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-native": "0.72.5",
"react-native-gesture-handler": "^2.12.1",
"react-native-safe-area-context": "^4.4.1",
"react-native-svg": "13.4.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {

`@gluestack-ui/themed` is a component library which provides universal, accessible, interactive, styled components.

The accessibility, interactivity and other features of the components are provided by `@gluestack-ui/themed`. The styling of the components is done by using another library [gluestack-style](https://style.gluestack.io/). We can use customised styles, theme tokens, dark and light mode, breakpoints etc with the help of `@gluestack-style`
The accessibility, interactivity and other features of the components are provided by `@gluestack-ui/themed`. The styling of the components is done by using another library [gluestack-style](https://style.gluestack.io/style/). We can use customised styles, theme tokens, dark and light mode, breakpoints etc with the help of `@gluestack-style`

By default gluestack-ui components comes with a default base styling for all components, which is acheived when the components are wrapped with a Provider that takes in a theme file. `@gluestack-ui/themed` ships a theme created by team of designers after a lot of research. But what if there is a need to customise the base styling for all components or just the theme file. Don't worry we got you covered.

Expand Down
40 changes: 28 additions & 12 deletions example/storybook/src/advanced/Animations/index.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ import { Canvas, Meta, Story } from '@storybook/addon-docs';

# Animations

gluestack-ui leverages the power of the [Animation plugin](https://style.gluestack.io/docs/plugins/animation-plugin) from [style.gluestack.io](https://style.gluestack.io) to provide animations for a more engaging user experience. By default, all of our animated components are built using the [@legendapp/motion](https://legendapp.com/open-source/motion/), which provides declarative animations for React Native.
gluestack-ui leverages the power of the [Animation plugin](/style/docs/plugins/animation-plugin) from [gluestack.io/style](/style) to provide animations for a more engaging user experience. By default, all of our animated components are built using the [@legendapp/motion](https://legendapp.com/open-source/motion/), which provides declarative animations for React Native.

### Usage:

By default, gluestack-ui exports styled function with `animation plugin` enabled. You can use it to create your own animated components.
By default, gluestack-ui/themed comes with with `animation plugin` plugin installed with `@legendapp/motion` animation driver. You can use the Animatable Components from `@gluestack-style/animation-resolver` and from them you can create your own animated components.

```jsx
const Box = styled(Motion.View, {
import { AnimatedView } from '@gluestack-style/animation-resolver';
import { styled } from '@gluestack-style/react';

const AnimatedBox = styled(AnimatedView, {
':initial': {
opacity: 0,
},
Expand All @@ -34,30 +37,43 @@ const Box = styled(Motion.View, {
});
```

## Overlay components:
or You can also extend the style of the animated components and customize it.

gluestack-ui also provides a set of overlay components that can be used to create a modal-like experience. All the animation props works out of the box with these components. However, to animate component on exit you need to pass [AnimatePresence](https://legendapp.com/open-source/motion/animate-presence/) while creating component.
```jsx
const componentTheme = createComponents({
...defaultConfig.components,
ModalContent: {
theme: {
':initial': {
bg: 'white',
},
},
},
});

If you are using [@legendapp/motion](https://legendapp.com/open-source/motion/), you can use `<component-name>.AnimatePresence`, which internally uses `AnimatePresence` from `@legendapp/motion`.
// Pass this componentTheme in the provider.
```

### Why ComponentName.AnimatePresence and not AnimatePresence from @legendapp/motion?
## Overlay components:

For exit animation, `@legendapp/motion` internally loops over children and tries to find the `exit` prop directly. However, with our wrapper component, we can pass the `exit` prop to the component, and it will work as expected with `AnimatePresence`.
gluestack-ui also provides a set of overlay components that can be used to create a modal-like experience. All the animation props works out of the box with these components. However, to animate component on exit you need to pass [AnimatePresence](https://legendapp.com/open-source/motion/animate-presence/) while creating component.

> Note: If you are using any other animation library, you can use `AnimatePresence` or something similar(which animates component on exit) from your library.
If you can use `AnimatePresence` from `@gluestack-style/animation-resolver`, which internally uses `AnimatePresence` from your chosen driver.

### Example:

```jsx
import { AnimatePresence } from '@gluestack-style/animation-resolver';

export const Tooltip = createTooltip({
Root,
Content,
AnimatePresence: Content.AnimatePresence, // Can be AnimatePresence from the library you are using
AnimatePresence, // Can be AnimatePresence from the library you are using
});
```

## Advanced concepts for animations in gluestack-ui

However, you are not limited to use only that library. You can use any declarative animation library you prefer, such as [framer-motion](https://www.framer.com/motion/), and [moti](https://moti.fyi/), or others. You can add aliases for animation props from your library. For example, if you are using moti, you can add aliases for `from`, `animate`, and `exit` props.
However, you are not limited to use only `@legendapp/motion`. You can use any declarative animation library you prefer, such as [framer-motion](https://www.framer.com/motion/), and [moti](https://moti.fyi/), or others. You can add your own animation driver to the `animation-resolver` plugin and use it with gluestack-ui. Currently we only provide 2 drivers, `@legendapp/motion` and `moti`.

You can refer to [animation plugin](https://style.gluestack.io/docs/plugins/animation-plugin) documentation for more details.
You can refer to [customizing animations](/ui/docs/theme-configuration/customizing-theme) section's documentation for more details on customizing the Animation Components.
4 changes: 2 additions & 2 deletions example/storybook/src/advanced/Fonts/index.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Add the font name in the `gluestack.config.js` file in the `fonts` object.

## Advanced concepts for fonts in gluestack-ui

In gluestack-ui, components are styled using `styled` provided by `@gluestack-style/react` package, [check here](https://style.gluestack.io/).
In gluestack-ui, components are styled using `styled` provided by `@gluestack-style/react` package, [check here](https://style.gluestack.io/style
This package provides a way to add plugins using `createStyled` function.

```bash
Expand All @@ -165,6 +165,6 @@ const StyledText = styled(Text, {
});
```

You can use this `styled` function which has the [font plugin](https://style.gluestack.io/docs/plugins/fonts-plugin) added to it to style your components. For gluestack-ui components, we have used this styled function to style the components.
You can use this `styled` function which has the [font plugin](https://style.gluestack.io/styleplugin) added to it to style your components. For gluestack-ui components, we have used this styled function to style the components.

Similarly, we can pass font styles to any component and then use the returned component (with font styles added).
Loading