7.1.6 • Published 11 months ago

tamia v7.1.6

Weekly downloads
7
License
MIT
Repository
github
Last release
11 months ago

Tâmia

npm Node.js CI status

Tâmia is a tiny React component library with themable primitives that you can use to quickly start working on a new project.

Based on

Tools

There are a few other things made specifically for Tâmia:

Documentation

Documentation is here.

Getting started

  1. Install Tâmia and peer dependencies:
npm install tamia @pandacss/dev
  1. Create a Panda CSS config, panda.config.cjs:
import { defineConfig } from '@pandacss/dev';
import tamia from 'tamia';
import { theme } from './src/theme';

export default defineConfig({
  ...theme,

  presets: [tamia],

  // Opt out of all default
  eject: true,

  // Output directory
  outdir: 'styled-system',

  // Generate React components based on patterns
  jsxFramework: 'react',

  // Don't include CSS reset
  preflight: false,

  // Where to look for CSS declarations
  include: ['./src/**/*.{js,jsx,ts,tsx,astro}'],

  // Files to exclude
  exclude: []
});
  1. Create a PostCSS config, postcss.config.cjs:
module.exports = {
  plugins: {
    '@pandacss/dev/postcss': {}
  }
};
  1. Update your package.json:
{
  "scripts": {
+   "prepare": "panda codegen",
    "dev": "astro dev",
    "start": "astro start",
    "build": "astro build",
    "preview": "astro preview"
  }
}
  1. Add this line to your global CSS:
@layer reset, base, tokens, recipes, utilities;

Tip: Don't forget to import it from your main template.

  1. Add the generated files to your ignore files: .gitignore, .prettierignore, .eslintignore, etc:
+ styled-system
  1. Create a theme, src/theme.ts.

Check out the default theme,and extend it according to your taste:

import { type Config } from '@pandacss/dev';

export const theme = {
  theme: {
    extend: {
      tokens: {
        colors: {
          text: { value: '#222' },
          background: { value: '#fff' },
          primary: { value: '#6e56ba' },
          accent: { value: '#d396c3' },
          border: { value: '#ddd' }
        },
        fonts: {
          body: {
            value: "ProximaNova, 'Helvetica Neue', Arial, sans-serif"
          },
          heading: {
            value: "AzoSans, 'Helvetica Neue', Arial, sans-serif"
          },
          ui: {
            value: "AzoSans, 'Helvetica Neue', Arial, sans-serif"
          }
        },
        fontSizes: {
          xxl: { value: '2.1rem' },
          xl: { value: '1.3rem' },
          l: { value: '1.1rem' },
          m: { value: '1rem' },
          s: { value: '0.9rem' },
          xs: { value: '0.75rem' }
        },
        fontWeights: {
          normal: { value: '400' },
          heading: { value: '400' },
          bold: { value: '800' },
          ui: { value: '800' }
        },
        lineHeights: {
          base: { value: '1.5' },
          heading: { value: '1.1' },
          small: { value: '1.4' },
          large: { value: '1.8' }
        },
        letterSpacings: {
          base: { value: '0' },
          heading: { value: '0' },
          uppercase: { value: '0.15ex' }
        },
        borders: {},
        radii: {},
        shadows: {},
        easings: {},
        durations: {}
      },
      semanticTokens: {
        fontSizes: {
          root: { value: '1.125em' },
          article: { value: '1.1rem' }
        },
        spacing: {
          listMargin: { value: '1.2rem' }
        },
        sizes: {
          textMaxWidth: { value: '48rem' }
        }
      }
    }
  },

  globalCss: {}
} as const satisfies Config;
  1. Generate the styled system, run:
npm run prepare --clean
  1. Copy the components, you're going to use fro src/components.

The Name

Tâmia is a chipmunk in Portuguese. It refers to Squirrelstrap, my love of small cheeky creatures and “Chip ’n Dale Rescue Rangers” (which is exactly framework’s aim).

History

Tâmia has evolved from a folder on my disk with a few CSS and JS files that I copypasted to every new project in 2000s. Notable iterations are:

  • Grunt + Stylus + jQuery (2013)
  • Webpack + browser-sync + ES6/Babel + Web Components + Stylus (2016)
  • Webpack 2 + browser-sync + PostCSS + cssnext + CSS Modules + ES6/Babel (2017)
  • React + Emotion + ES6/Babel (2018)
  • React + styled-components + styled-system + TypeScript (2019)
  • React + styled-components + TypeScript + custom primitive components (2022)
  • React + vanilla-extract + TypeScript (2023)
  • React + Panda CSS + TypeScript (2024)

License

The MIT License, see the included License.md file.

7.1.6

11 months ago

7.1.5

1 year ago

7.1.4

1 year ago

7.1.3

1 year ago

7.1.2

1 year ago

7.1.1

1 year ago

7.1.0

1 year ago

7.0.3

1 year ago

7.0.2

1 year ago

7.0.1

1 year ago

7.0.0

1 year ago

6.0.27

2 years ago

6.0.26

2 years ago

6.0.25

2 years ago

6.0.24

2 years ago

6.0.29

2 years ago

6.0.28

2 years ago

6.0.22

2 years ago

6.0.21

2 years ago

6.0.20

2 years ago

6.0.16

2 years ago

6.0.15

2 years ago

6.0.14

2 years ago

6.0.13

2 years ago

6.0.19

2 years ago

6.0.18

2 years ago

6.0.17

2 years ago

6.0.12

2 years ago

6.0.11

2 years ago

6.0.10

2 years ago

6.0.30

2 years ago

6.0.32

2 years ago

6.0.31

2 years ago

6.0.7

2 years ago

6.0.6

2 years ago

6.0.8

2 years ago

6.0.1

2 years ago

6.0.0

2 years ago

6.0.3

2 years ago

6.0.2

2 years ago

6.0.5

2 years ago

6.0.4

2 years ago

5.12.2

3 years ago

5.12.1

3 years ago

5.12.0

3 years ago

5.13.1

3 years ago

5.13.0

3 years ago

5.11.4

4 years ago

5.11.3

4 years ago

5.11.2

4 years ago

5.11.1

4 years ago

5.11.0

4 years ago

5.10.1

5 years ago

5.10.0

5 years ago

5.9.5

5 years ago

5.9.4

5 years ago

5.9.3

5 years ago

5.9.2

5 years ago

5.9.1

5 years ago

5.9.0

5 years ago

5.8.2

5 years ago

5.8.1

5 years ago

5.8.0

5 years ago

5.7.0

5 years ago

5.6.0

5 years ago

5.5.2

5 years ago

5.5.1

5 years ago

5.5.0

5 years ago

5.4.0

5 years ago

5.3.0

5 years ago

5.2.1

5 years ago

5.2.0

5 years ago

5.1.0

5 years ago

5.0.20

6 years ago

5.0.19

6 years ago

5.0.18

6 years ago

5.0.17

6 years ago

5.0.16

6 years ago

5.0.15

6 years ago

5.0.14

6 years ago

5.0.0-alpha.13

6 years ago

5.0.0-alpha.12

6 years ago

5.0.0-alpha.11

6 years ago

5.0.0-alpha.10

6 years ago

5.0.0-alpha.9

6 years ago

5.0.0-alpha8

6 years ago

5.0.0-alpha.8

6 years ago

5.0.0-alpha.7

6 years ago

5.0.0-alpha.6

6 years ago

5.0.0-alpha.5

6 years ago

5.0.0-alpha.4

6 years ago

5.0.0-alpha.3

6 years ago

5.0.0-alpha.2

6 years ago

5.0.0-alpha.1

6 years ago

4.0.0-alpha.49

6 years ago

4.0.0-alpha.48

6 years ago

4.0.0-alpha.47

6 years ago

4.0.0-alpha.46

6 years ago

4.0.0-alpha.45

6 years ago

4.0.0-alpha.44

6 years ago

4.0.0-alpha.43

6 years ago

4.0.0-alpha.42

6 years ago

4.0.0-alpha.41

6 years ago

4.0.0-alpha.40

6 years ago

4.0.0-alpha.39

6 years ago

4.0.0-alpha.38

6 years ago

4.0.0-alpha.37

6 years ago

4.0.0-alpha.36

6 years ago

4.0.0-alpha.35

6 years ago

4.0.0-alpha.34

6 years ago

4.0.0-alpha.33

6 years ago

4.0.0-alpha.32

6 years ago

4.0.0-alpha.31

6 years ago

4.0.0-alpha.30

6 years ago

4.0.0-alpha.29

6 years ago

4.0.0-alpha.28

6 years ago

4.0.0-alpha.27

6 years ago

4.0.0-alpha.26

6 years ago

4.0.0-alpha.25

6 years ago

4.0.0-alpha.24

6 years ago

4.0.0-alpha.23

6 years ago

4.0.0-alpha.22

6 years ago

4.0.0-alpha.21

6 years ago

4.0.0-alpha.20

6 years ago

4.0.0-alpha.19

6 years ago

4.0.0-alpha.18

7 years ago

4.0.0-alpha.17

7 years ago

4.0.0-alpha.16

7 years ago

4.0.0-alpha.15

7 years ago

4.0.0-alpha.14

7 years ago

4.0.0-alpha.13

7 years ago

4.0.0-alpha.12

7 years ago

4.0.0-alpha.11

7 years ago

4.0.0-alpha.10

7 years ago

4.0.0-alpha.9

7 years ago

4.0.0-alpha.8

7 years ago

4.0.0-alpha.7

7 years ago

4.0.0-alpha.6

7 years ago

4.0.0-alpha.5

7 years ago

4.0.0-alpha.4

7 years ago

4.0.0-alpha.3

7 years ago

4.0.0-aplha.2

7 years ago

3.0.0-aplha.13

8 years ago

3.0.0-aplha.12

8 years ago

3.0.0-aplha.11

8 years ago

3.0.0-aplha.10

8 years ago

3.0.0-aplha.9

8 years ago

3.0.0-aplha.8

8 years ago

3.0.0-aplha.7

8 years ago

3.0.0-aplha.6

8 years ago

3.0.0-aplha.5

8 years ago

3.0.0-aplha.4

8 years ago

3.0.0-aplha.3

8 years ago

3.0.0-aplha.2

8 years ago

3.0.0-aplha.1

8 years ago

3.0.0-aplha.0

8 years ago

2.0.8

9 years ago

2.0.7

9 years ago

2.0.6

9 years ago

2.0.5

9 years ago

2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago